diff --git a/.fern/metadata.json b/.fern/metadata.json index 24eedb9..dd87523 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -10,10 +10,10 @@ "base-exception-class-name": "CloudPDFException", "base-api-exception-class-name": "CloudPDFApiException" }, - "originGitCommit": "e5cd0731cb3a1f2ed5821f8d60191bd58934c3dd", + "originGitCommit": "31a712963c171ce9ebd6815e873c9895e389afc2", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0-next.9", + "requestedVersion": "3.0.0-next.10", "ciProvider": "github", - "sdkVersion": "3.0.0-next.9" + "sdkVersion": "3.0.0-next.10" } \ No newline at end of file diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index 2fadc6f..9019088 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "csharp", - "canonicalVersion": "3.0.0-next.9", - "sdkVersion": "3.0.0-next.9", + "canonicalVersion": "3.0.0-next.10", + "sdkVersion": "3.0.0-next.10", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "4ee27900dbb0b13408ce00a0e80d606444ab81e9d5a76186fa984c8c8dfe09fe", - "gitCommit": "e5cd0731cb3a1f2ed5821f8d60191bd58934c3dd", + "openapiSha256": "9d6c7cdd459982ba9e718a3842c969003b466e3fd73883fef7783dc78e12cdfe", + "gitCommit": "31a712963c171ce9ebd6815e873c9895e389afc2", "gitCommitIsDirty": false }, "fern": { diff --git a/reference.md b/reference.md index 0159a9d..ba99d57 100644 --- a/reference.md +++ b/reference.md @@ -1402,6 +1402,62 @@ await client.Tokens.RevokeAsync(new TokensRevokeRequest { TenantId = "tenantId", ## Doc Annotations +
client.Doc.Annotations.ListAllAsync(ListAllAnnotationsRequest { ... }) -> WithRawResponseTask<DocAnnotationsListAll200Response> +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by `pageState.pageObjectNumber` when display order matters. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Doc.Annotations.ListAllAsync( + new ListAllAnnotationsRequest { DocId = "docId", LayerName = "layerName" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ListAllAnnotationsRequest` + +
+
+
+
+ + +
+
+
+
client.Doc.Annotations.ListAsync(ListAnnotationsRequest { ... }) -> WithRawResponseTask<DocAnnotationsList200Response>
diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/CreateTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/CreateTest.cs index 8ce03c3..5559150 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/CreateTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/CreateTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -133,6 +134,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/DeleteTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/DeleteTest.cs index 4f06266..04a8e69 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/DeleteTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/DeleteTest.cs @@ -42,6 +42,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -111,6 +112,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListAllTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListAllTest.cs new file mode 100644 index 0000000..a3ff029 --- /dev/null +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListAllTest.cs @@ -0,0 +1,894 @@ +using CloudPDF.Doc; +using CloudPDF.Test.Unit.MockServer; +using CloudPDF.Test.Utils; +using NUnit.Framework; + +namespace CloudPDF.Test.Unit.MockServer.Doc.Annotations; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class ListAllTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest_1() + { + const string mockResponse = """ + { + "pages": [ + { + "pageState": { + "pageObjectNumber": 1, + "revision": { + "docSessionId": "docSessionId", + "pageObjectNumber": 1, + "generation": 1 + }, + "weakAnnotationState": { + "kind": "unknown" + } + }, + "annotations": [ + { + "subtype": "highlight", + "ref": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "pageObjectNumber": 1, + "index": 1, + "identityQuality": "durable", + "nm": "nm", + "flags": { + "invisible": true, + "hidden": true, + "print": true, + "noZoom": true, + "noRotate": true, + "noView": true, + "readOnly": true, + "locked": true, + "toggleNoView": true, + "lockedContents": true + }, + "rect": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "contents": "contents", + "subject": "subject", + "author": "author", + "created": "2024-01-15T09:30:00.000Z", + "modified": "2024-01-15T09:30:00.000Z", + "blendMode": "normal", + "inReplyTo": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "replyType": "reply", + "userId": "userId", + "groupId": "groupId", + "createdBy": "createdBy", + "updatedBy": "updatedBy", + "actions": { + "activate": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorEnter": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorExit": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseDown": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseUp": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "focus": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "blur": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageOpen": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageClose": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageVisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageInvisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + } + }, + "color": { + "r": 255, + "g": 255, + "b": 255 + }, + "opacity": 1, + "quadPoints": [ + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + }, + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + } + ] + }, + { + "subtype": "highlight", + "ref": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "pageObjectNumber": 1, + "index": 1, + "identityQuality": "durable", + "nm": "nm", + "flags": { + "invisible": true, + "hidden": true, + "print": true, + "noZoom": true, + "noRotate": true, + "noView": true, + "readOnly": true, + "locked": true, + "toggleNoView": true, + "lockedContents": true + }, + "rect": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "contents": "contents", + "subject": "subject", + "author": "author", + "created": "2024-01-15T09:30:00.000Z", + "modified": "2024-01-15T09:30:00.000Z", + "blendMode": "normal", + "inReplyTo": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "replyType": "reply", + "userId": "userId", + "groupId": "groupId", + "createdBy": "createdBy", + "updatedBy": "updatedBy", + "actions": { + "activate": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorEnter": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorExit": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseDown": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseUp": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "focus": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "blur": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageOpen": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageClose": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageVisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageInvisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + } + }, + "color": { + "r": 255, + "g": 255, + "b": 255 + }, + "opacity": 1, + "quadPoints": [ + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + }, + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + } + ] + } + ] + }, + { + "pageState": { + "pageObjectNumber": 1, + "revision": { + "docSessionId": "docSessionId", + "pageObjectNumber": 1, + "generation": 1 + }, + "weakAnnotationState": { + "kind": "unknown" + } + }, + "annotations": [ + { + "subtype": "highlight", + "ref": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "pageObjectNumber": 1, + "index": 1, + "identityQuality": "durable", + "nm": "nm", + "flags": { + "invisible": true, + "hidden": true, + "print": true, + "noZoom": true, + "noRotate": true, + "noView": true, + "readOnly": true, + "locked": true, + "toggleNoView": true, + "lockedContents": true + }, + "rect": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "contents": "contents", + "subject": "subject", + "author": "author", + "created": "2024-01-15T09:30:00.000Z", + "modified": "2024-01-15T09:30:00.000Z", + "blendMode": "normal", + "inReplyTo": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "replyType": "reply", + "userId": "userId", + "groupId": "groupId", + "createdBy": "createdBy", + "updatedBy": "updatedBy", + "actions": { + "activate": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorEnter": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorExit": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseDown": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseUp": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "focus": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "blur": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageOpen": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageClose": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageVisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageInvisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + } + }, + "color": { + "r": 255, + "g": 255, + "b": 255 + }, + "opacity": 1, + "quadPoints": [ + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + }, + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + } + ] + }, + { + "subtype": "highlight", + "ref": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "pageObjectNumber": 1, + "index": 1, + "identityQuality": "durable", + "nm": "nm", + "flags": { + "invisible": true, + "hidden": true, + "print": true, + "noZoom": true, + "noRotate": true, + "noView": true, + "readOnly": true, + "locked": true, + "toggleNoView": true, + "lockedContents": true + }, + "rect": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "contents": "contents", + "subject": "subject", + "author": "author", + "created": "2024-01-15T09:30:00.000Z", + "modified": "2024-01-15T09:30:00.000Z", + "blendMode": "normal", + "inReplyTo": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "replyType": "reply", + "userId": "userId", + "groupId": "groupId", + "createdBy": "createdBy", + "updatedBy": "updatedBy", + "actions": { + "activate": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorEnter": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "cursorExit": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseDown": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "mouseUp": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "focus": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "blur": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageOpen": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageClose": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageVisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + }, + "pageInvisible": { + "incomplete": true, + "warningFlags": 1, + "warnings": [ + "cycle-dropped", + "cycle-dropped" + ] + } + }, + "color": { + "r": 255, + "g": 255, + "b": 255 + }, + "opacity": 1, + "quadPoints": [ + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + }, + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + } + ] + } + ] + } + ], + "auditHead": 1 + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/v1/docs/docId/layers/layerName/annotations/items") + .UsingGet() + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Doc.Annotations.ListAllAsync( + new ListAllAnnotationsRequest { DocId = "docId", LayerName = "layerName" } + ); + JsonAssert.AreEqual(response, mockResponse); + } + + [NUnit.Framework.Test] + public async Task MockServerTest_2() + { + const string mockResponse = """ + { + "pages": [ + { + "pageState": { + "pageObjectNumber": 1, + "revision": { + "docSessionId": "docSessionId", + "pageObjectNumber": 1, + "generation": 1 + }, + "weakAnnotationState": { + "kind": "unknown" + } + }, + "annotations": [ + { + "subtype": "highlight", + "ref": { + "kind": "objectNumber", + "pageObjectNumber": 1, + "annotObjectNumber": 1 + }, + "pageObjectNumber": 1, + "index": 1, + "identityQuality": "durable", + "flags": { + "invisible": true, + "hidden": true, + "print": true, + "noZoom": true, + "noRotate": true, + "noView": true, + "readOnly": true, + "locked": true, + "toggleNoView": true, + "lockedContents": true + }, + "rect": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "blendMode": "normal", + "color": { + "r": 1, + "g": 1, + "b": 1 + }, + "opacity": 1.1, + "quadPoints": [ + { + "p1": { + "x": 1.1, + "y": 1.1 + }, + "p2": { + "x": 1.1, + "y": 1.1 + }, + "p3": { + "x": 1.1, + "y": 1.1 + }, + "p4": { + "x": 1.1, + "y": 1.1 + } + } + ] + } + ] + } + ], + "auditHead": 1 + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/v1/docs/docId/layers/layerName/annotations/items") + .UsingGet() + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Doc.Annotations.ListAllAsync( + new ListAllAnnotationsRequest { DocId = "docId", LayerName = "layerName" } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListTest.cs index 38e9869..1dbfdca 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/ListTest.cs @@ -56,6 +56,7 @@ public async Task MockServerTest_1() "top": 1.1 }, "contents": "contents", + "subject": "subject", "author": "author", "created": "2024-01-15T09:30:00.000Z", "modified": "2024-01-15T09:30:00.000Z", @@ -378,6 +379,7 @@ public async Task MockServerTest_1() "top": 1.1 }, "contents": "contents", + "subject": "subject", "author": "author", "created": "2024-01-15T09:30:00.000Z", "modified": "2024-01-15T09:30:00.000Z", @@ -746,6 +748,7 @@ public async Task MockServerTest_2() "top": 1.1 }, "contents": "contents", + "subject": "subject", "author": "author", "created": "2024-01-15T09:30:00.000Z", "modified": "2024-01-15T09:30:00.000Z", diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/UpdateTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/UpdateTest.cs index dd26790..7053572 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/UpdateTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Annotations/UpdateTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -134,6 +135,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ImportDataTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ImportDataTest.cs index 2e09eb8..fd4a3fa 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ImportDataTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ImportDataTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ResetTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ResetTest.cs index 109b6d3..326a875 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ResetTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/ResetTest.cs @@ -42,6 +42,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -110,6 +111,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/SetValueTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/SetValueTest.cs index 87537c4..f58fd4c 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/SetValueTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Forms/SetValueTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -133,6 +134,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/ManifestTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/ManifestTest.cs index 8ce89ec..c83037b 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/ManifestTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/ManifestTest.cs @@ -19,6 +19,7 @@ public async Task MockServerTest_1() "metadataVersion": 1, "actionsVersion": 1, "attachmentsVersion": 1, + "annotationsVersion": 1, "auditHead": 1, "baseSha": "baseSha", "scopes": { @@ -98,6 +99,7 @@ public async Task MockServerTest_2() "metadataVersion": 1, "actionsVersion": 1, "attachmentsVersion": 1, + "annotationsVersion": 1, "auditHead": 1, "baseSha": "baseSha", "scopes": { diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/DeleteTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/DeleteTest.cs index 31eba2c..03e80d4 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/DeleteTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/DeleteTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/FlattenTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/FlattenTest.cs index 7974c61..e88e733 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/FlattenTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/FlattenTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/InsertBlankTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/InsertBlankTest.cs index 91cc789..688be7e 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/InsertBlankTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/InsertBlankTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/MoveTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/MoveTest.cs index d174507..9da7144 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/MoveTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/MoveTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/RotateTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/RotateTest.cs index 4fcb9ea..844f643 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/RotateTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/RotateTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Redactions/ApplyTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Redactions/ApplyTest.cs index 1d2d435..5d41d14 100644 --- a/src/CloudPDF.Test/Unit/MockServer/Doc/Redactions/ApplyTest.cs +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Redactions/ApplyTest.cs @@ -50,6 +50,7 @@ public async Task MockServerTest_1() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, @@ -132,6 +133,7 @@ public async Task MockServerTest_2() "cacheDelta": { "previousDocVersion": 1, "docVersion": 1, + "annotationsVersion": 1, "pages": [ { "pageObjectNumber": 1, diff --git a/src/CloudPDF/CloudPDF.csproj b/src/CloudPDF/CloudPDF.csproj index 08da019..20d78d3 100644 --- a/src/CloudPDF/CloudPDF.csproj +++ b/src/CloudPDF/CloudPDF.csproj @@ -11,7 +11,7 @@ enable 12 enable - 3.0.0-next.9 + 3.0.0-next.10 3.0.0.0 3.0.0.0 README.md diff --git a/src/CloudPDF/Core/Public/Version.cs b/src/CloudPDF/Core/Public/Version.cs index 44fbbb3..020dbec 100644 --- a/src/CloudPDF/Core/Public/Version.cs +++ b/src/CloudPDF/Core/Public/Version.cs @@ -3,5 +3,5 @@ namespace CloudPDF; [Serializable] internal class Version { - public const string Current = "3.0.0-next.9"; + public const string Current = "3.0.0-next.10"; } diff --git a/src/CloudPDF/Doc/Annotations/AnnotationsClient.cs b/src/CloudPDF/Doc/Annotations/AnnotationsClient.cs index de69964..c3ddd89 100644 --- a/src/CloudPDF/Doc/Annotations/AnnotationsClient.cs +++ b/src/CloudPDF/Doc/Annotations/AnnotationsClient.cs @@ -13,6 +13,128 @@ internal AnnotationsClient(RawClient client) _client = client; } + private async Task> ListAllAsyncCore( + ListAllAnnotationsRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _queryString = new CloudPDF.Core.QueryStringBuilder.Builder(capacity: 0) + .MergeAdditional(options?.AdditionalQueryParameters) + .Build(); + var _headers = await new CloudPDF.Core.HeadersBuilder.Builder() + .Add("X-Document-Password", request.DocumentPassword) + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Get, + Path = string.Format( + "v1/docs/{0}/layers/{1}/annotations/items", + ValueConvert.ToPathParameterString(request.DocId), + ValueConvert.ToPathParameterString(request.LayerName) + ), + QueryString = _queryString, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize( + responseBody + )!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new CloudPDF.RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new CloudPDFApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e, + rawResponse: new CloudPDF.RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + } + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + switch (response.StatusCode) + { + case 404: + throw new NotFoundError( + JsonUtils.Deserialize(responseBody), + rawResponse: new CloudPDF.RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = + response.Raw.RequestMessage?.RequestUri + ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + } + ); + case 409: + throw new ConflictError( + JsonUtils.Deserialize(responseBody), + rawResponse: new CloudPDF.RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = + response.Raw.RequestMessage?.RequestUri + ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + } + ); + } + } + catch (JsonException) + { + // unable to map error response, throwing generic error + } + throw new CloudPDFApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody, + rawResponse: new CloudPDF.RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + } + ); + } + } + private async Task> ListAsyncCore( ListAnnotationsRequest request, RequestOptions? options = null, @@ -487,6 +609,25 @@ private async Task> UpdateAsync } } + /// + /// Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by `pageState.pageObjectNumber` when display order matters. + /// + /// + /// await client.Doc.Annotations.ListAllAsync( + /// new ListAllAnnotationsRequest { DocId = "docId", LayerName = "layerName" } + /// ); + /// + public WithRawResponseTask ListAllAsync( + ListAllAnnotationsRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask( + ListAllAsyncCore(request, options, cancellationToken) + ); + } + /// /// await client.Doc.Annotations.ListAsync( /// new ListAnnotationsRequest diff --git a/src/CloudPDF/Doc/Annotations/IAnnotationsClient.cs b/src/CloudPDF/Doc/Annotations/IAnnotationsClient.cs index 2e4cd1a..49888f7 100644 --- a/src/CloudPDF/Doc/Annotations/IAnnotationsClient.cs +++ b/src/CloudPDF/Doc/Annotations/IAnnotationsClient.cs @@ -4,6 +4,15 @@ namespace CloudPDF.Doc; public partial interface IAnnotationsClient { + /// + /// Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by `pageState.pageObjectNumber` when display order matters. + /// + WithRawResponseTask ListAllAsync( + ListAllAnnotationsRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + WithRawResponseTask ListAsync( ListAnnotationsRequest request, RequestOptions? options = null, diff --git a/src/CloudPDF/Doc/Annotations/Requests/ListAllAnnotationsRequest.cs b/src/CloudPDF/Doc/Annotations/Requests/ListAllAnnotationsRequest.cs new file mode 100644 index 0000000..e34589c --- /dev/null +++ b/src/CloudPDF/Doc/Annotations/Requests/ListAllAnnotationsRequest.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record ListAllAnnotationsRequest +{ + [JsonIgnore] + public required string DocId { get; set; } + + [JsonIgnore] + public required string LayerName { get; set; } + + /// + /// Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. + /// + [JsonIgnore] + public string? DocumentPassword { get; set; } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Documents/DocumentsClient.cs b/src/CloudPDF/Documents/DocumentsClient.cs index 08cc119..d79fa63 100644 --- a/src/CloudPDF/Documents/DocumentsClient.cs +++ b/src/CloudPDF/Documents/DocumentsClient.cs @@ -728,7 +728,7 @@ private async Task> UploadProxy ); case 409: throw new ConflictError( - JsonUtils.Deserialize(responseBody), + JsonUtils.Deserialize(responseBody), rawResponse: new CloudPDF.RawResponse() { StatusCode = response.Raw.StatusCode, diff --git a/src/CloudPDF/Exceptions/ConflictError.cs b/src/CloudPDF/Exceptions/ConflictError.cs index 4cea6f1..4dd6a18 100644 --- a/src/CloudPDF/Exceptions/ConflictError.cs +++ b/src/CloudPDF/Exceptions/ConflictError.cs @@ -4,13 +4,5 @@ namespace CloudPDF; /// This exception type will be thrown for any non-2XX API responses. /// [Serializable] -public class ConflictError( - DocumentsUploadProxy409Response body, - CloudPDF.RawResponse? rawResponse = null -) : CloudPDFApiException("ConflictError", 409, body, rawResponse: rawResponse) -{ - /// - /// The body of the response that triggered the exception. - /// - public new DocumentsUploadProxy409Response Body => body; -} +public class ConflictError(object body, CloudPDF.RawResponse? rawResponse = null) + : CloudPDFApiException("ConflictError", 409, body, rawResponse: rawResponse); diff --git a/src/CloudPDF/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.cs index 33b55d4..4fa7713 100644 --- a/src/CloudPDF/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocAnnotationsCreate200ResponseMetaCacheDelta : IJsonOnDeserialize [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.cs index 24cf610..7c78c14 100644 --- a/src/CloudPDF/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocAnnotationsDelete200ResponseMetaCacheDelta : IJsonOnDeserialize [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCaret.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCaret.cs index 00b189d..93589c2 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCaret.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCaret.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemCaret : IJsonOnDeseria [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCircle.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCircle.cs index f825702..c607ed0 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCircle.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemCircle.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemCircle : IJsonOnDeseri [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFileAttachment.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFileAttachment.cs index 346f580..9787c91 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFileAttachment.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFileAttachment.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemFileAttachment : IJson [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.cs index c38000d..5bfaa2a 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemFreeText : IJsonOnDese [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemHighlight.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemHighlight.cs index 3753cf8..bdf80b0 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemHighlight.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemHighlight.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemHighlight : IJsonOnDes [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemInk.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemInk.cs index 783efe8..ec2826c 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemInk.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemInk.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemInk : IJsonOnDeseriali [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs index 905b576..f7e70e3 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemLine : IJsonOnDeserial [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLink.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLink.cs index 0c5362a..ec47a13 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLink.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLink.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemLink : IJsonOnDeserial [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs index 42adcd8..c54d0ec 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemPolygon : IJsonOnDeser [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs index b330740..b1fbabb 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemPolyline : IJsonOnDese [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemRedact.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemRedact.cs index 1e8122f..77039b8 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemRedact.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemRedact.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemRedact : IJsonOnDeseri [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquare.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquare.cs index 9af9f92..884eefe 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquare.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquare.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemSquare : IJsonOnDeseri [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquiggly.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquiggly.cs index 24ae8ac..4776064 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquiggly.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemSquiggly.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemSquiggly : IJsonOnDese [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStamp.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStamp.cs index 7fe621b..e783935 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStamp.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStamp.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemStamp : IJsonOnDeseria [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStrikeout.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStrikeout.cs index aaeb3e8..357144b 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStrikeout.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemStrikeout.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemStrikeout : IJsonOnDes [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemText.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemText.cs index 4762a5a..15ac075 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemText.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemText.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemText : IJsonOnDeserial [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } @@ -77,6 +80,12 @@ public record DocAnnotationsList200ResponseAnnotationsItemText : IJsonOnDeserial [JsonPropertyName("icon")] public required DocAnnotationsList200ResponseAnnotationsItemTextIcon Icon { get; set; } + [JsonPropertyName("state")] + public string? State { get; set; } + + [JsonPropertyName("stateModel")] + public string? StateModel { get; set; } + [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnderline.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnderline.cs index d49ebe7..5eee45f 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnderline.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnderline.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemUnderline : IJsonOnDes [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnsupported.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnsupported.cs index 1b97146..a924185 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnsupported.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemUnsupported.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemUnsupported : IJsonOnD [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemWidget.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemWidget.cs index 2d678e2..6e2bdd0 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemWidget.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemWidget.cs @@ -35,6 +35,9 @@ public record DocAnnotationsList200ResponseAnnotationsItemWidget : IJsonOnDeseri [JsonPropertyName("contents")] public string? Contents { get; set; } + [JsonPropertyName("subject")] + public string? Subject { get; set; } + [JsonPropertyName("author")] public string? Author { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200Response.cs b/src/CloudPDF/Types/DocAnnotationsListAll200Response.cs new file mode 100644 index 0000000..09f3b34 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200Response.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pages")] + public IEnumerable Pages { get; set; } = + new List(); + + [JsonPropertyName("auditHead")] + public int? AuditHead { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItem.cs new file mode 100644 index 0000000..f1d0c55 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItem.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageState")] + public required DocAnnotationsListAll200ResponsePagesItemPageState PageState { get; set; } + + [JsonPropertyName("annotations")] + public IEnumerable Annotations { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.cs new file mode 100644 index 0000000..c1c26db --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.cs @@ -0,0 +1,1739 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.JsonConverter))] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItem +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItem(string type, object? value) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Highlight value + ) + { + Subtype = "highlight"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Underline value + ) + { + Subtype = "underline"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Squiggly value + ) + { + Subtype = "squiggly"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Strikeout value + ) + { + Subtype = "strikeout"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Circle value + ) + { + Subtype = "circle"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Square value + ) + { + Subtype = "square"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Polygon value + ) + { + Subtype = "polygon"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Polyline value + ) + { + Subtype = "polyline"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Line value + ) + { + Subtype = "line"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Link value + ) + { + Subtype = "link"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Ink value + ) + { + Subtype = "ink"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.FreeText value + ) + { + Subtype = "free-text"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Caret value + ) + { + Subtype = "caret"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Text value + ) + { + Subtype = "text"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Stamp value + ) + { + Subtype = "stamp"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.FileAttachment value + ) + { + Subtype = "file-attachment"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Widget value + ) + { + Subtype = "widget"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Redact value + ) + { + Subtype = "redact"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItem with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Unsupported value + ) + { + Subtype = "unsupported"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("subtype")] + public string Subtype { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "highlight" + /// + public bool IsHighlight => Subtype == "highlight"; + + /// + /// Returns true if is "underline" + /// + public bool IsUnderline => Subtype == "underline"; + + /// + /// Returns true if is "squiggly" + /// + public bool IsSquiggly => Subtype == "squiggly"; + + /// + /// Returns true if is "strikeout" + /// + public bool IsStrikeout => Subtype == "strikeout"; + + /// + /// Returns true if is "circle" + /// + public bool IsCircle => Subtype == "circle"; + + /// + /// Returns true if is "square" + /// + public bool IsSquare => Subtype == "square"; + + /// + /// Returns true if is "polygon" + /// + public bool IsPolygon => Subtype == "polygon"; + + /// + /// Returns true if is "polyline" + /// + public bool IsPolyline => Subtype == "polyline"; + + /// + /// Returns true if is "line" + /// + public bool IsLine => Subtype == "line"; + + /// + /// Returns true if is "link" + /// + public bool IsLink => Subtype == "link"; + + /// + /// Returns true if is "ink" + /// + public bool IsInk => Subtype == "ink"; + + /// + /// Returns true if is "free-text" + /// + public bool IsFreeText => Subtype == "free-text"; + + /// + /// Returns true if is "caret" + /// + public bool IsCaret => Subtype == "caret"; + + /// + /// Returns true if is "text" + /// + public bool IsText => Subtype == "text"; + + /// + /// Returns true if is "stamp" + /// + public bool IsStamp => Subtype == "stamp"; + + /// + /// Returns true if is "file-attachment" + /// + public bool IsFileAttachment => Subtype == "file-attachment"; + + /// + /// Returns true if is "widget" + /// + public bool IsWidget => Subtype == "widget"; + + /// + /// Returns true if is "redact" + /// + public bool IsRedact => Subtype == "redact"; + + /// + /// Returns true if is "unsupported" + /// + public bool IsUnsupported => Subtype == "unsupported"; + + /// + /// Returns the value as a if is 'highlight', otherwise throws an exception. + /// + /// Thrown when is not 'highlight'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight AsHighlight() => + IsHighlight + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'highlight'" + ); + + /// + /// Returns the value as a if is 'underline', otherwise throws an exception. + /// + /// Thrown when is not 'underline'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline AsUnderline() => + IsUnderline + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'underline'" + ); + + /// + /// Returns the value as a if is 'squiggly', otherwise throws an exception. + /// + /// Thrown when is not 'squiggly'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly AsSquiggly() => + IsSquiggly + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'squiggly'" + ); + + /// + /// Returns the value as a if is 'strikeout', otherwise throws an exception. + /// + /// Thrown when is not 'strikeout'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout AsStrikeout() => + IsStrikeout + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'strikeout'" + ); + + /// + /// Returns the value as a if is 'circle', otherwise throws an exception. + /// + /// Thrown when is not 'circle'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle AsCircle() => + IsCircle + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'circle'" + ); + + /// + /// Returns the value as a if is 'square', otherwise throws an exception. + /// + /// Thrown when is not 'square'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare AsSquare() => + IsSquare + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'square'" + ); + + /// + /// Returns the value as a if is 'polygon', otherwise throws an exception. + /// + /// Thrown when is not 'polygon'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon AsPolygon() => + IsPolygon + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'polygon'" + ); + + /// + /// Returns the value as a if is 'polyline', otherwise throws an exception. + /// + /// Thrown when is not 'polyline'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline AsPolyline() => + IsPolyline + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'polyline'" + ); + + /// + /// Returns the value as a if is 'line', otherwise throws an exception. + /// + /// Thrown when is not 'line'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine AsLine() => + IsLine + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'line'" + ); + + /// + /// Returns the value as a if is 'link', otherwise throws an exception. + /// + /// Thrown when is not 'link'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink AsLink() => + IsLink + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'link'" + ); + + /// + /// Returns the value as a if is 'ink', otherwise throws an exception. + /// + /// Thrown when is not 'ink'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk AsInk() => + IsInk + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'ink'" + ); + + /// + /// Returns the value as a if is 'free-text', otherwise throws an exception. + /// + /// Thrown when is not 'free-text'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText AsFreeText() => + IsFreeText + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'free-text'" + ); + + /// + /// Returns the value as a if is 'caret', otherwise throws an exception. + /// + /// Thrown when is not 'caret'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret AsCaret() => + IsCaret + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'caret'" + ); + + /// + /// Returns the value as a if is 'text', otherwise throws an exception. + /// + /// Thrown when is not 'text'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText AsText() => + IsText + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'text'" + ); + + /// + /// Returns the value as a if is 'stamp', otherwise throws an exception. + /// + /// Thrown when is not 'stamp'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp AsStamp() => + IsStamp + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'stamp'" + ); + + /// + /// Returns the value as a if is 'file-attachment', otherwise throws an exception. + /// + /// Thrown when is not 'file-attachment'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment AsFileAttachment() => + IsFileAttachment + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'file-attachment'" + ); + + /// + /// Returns the value as a if is 'widget', otherwise throws an exception. + /// + /// Thrown when is not 'widget'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget AsWidget() => + IsWidget + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'widget'" + ); + + /// + /// Returns the value as a if is 'redact', otherwise throws an exception. + /// + /// Thrown when is not 'redact'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact AsRedact() => + IsRedact + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'redact'" + ); + + /// + /// Returns the value as a if is 'unsupported', otherwise throws an exception. + /// + /// Thrown when is not 'unsupported'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported AsUnsupported() => + IsUnsupported + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Subtype is not 'unsupported'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight, + T + > onHighlight, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline, + T + > onUnderline, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly, + T + > onSquiggly, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout, + T + > onStrikeout, + Func onCircle, + Func onSquare, + Func onPolygon, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline, + T + > onPolyline, + Func onLine, + Func onLink, + Func onInk, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText, + T + > onFreeText, + Func onCaret, + Func onText, + Func onStamp, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment, + T + > onFileAttachment, + Func onWidget, + Func onRedact, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported, + T + > onUnsupported, + Func onUnknown_ + ) + { + return Subtype switch + { + "highlight" => onHighlight(AsHighlight()), + "underline" => onUnderline(AsUnderline()), + "squiggly" => onSquiggly(AsSquiggly()), + "strikeout" => onStrikeout(AsStrikeout()), + "circle" => onCircle(AsCircle()), + "square" => onSquare(AsSquare()), + "polygon" => onPolygon(AsPolygon()), + "polyline" => onPolyline(AsPolyline()), + "line" => onLine(AsLine()), + "link" => onLink(AsLink()), + "ink" => onInk(AsInk()), + "free-text" => onFreeText(AsFreeText()), + "caret" => onCaret(AsCaret()), + "text" => onText(AsText()), + "stamp" => onStamp(AsStamp()), + "file-attachment" => onFileAttachment(AsFileAttachment()), + "widget" => onWidget(AsWidget()), + "redact" => onRedact(AsRedact()), + "unsupported" => onUnsupported(AsUnsupported()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onHighlight, + Action onUnderline, + Action onSquiggly, + Action onStrikeout, + Action onCircle, + Action onSquare, + Action onPolygon, + Action onPolyline, + Action onLine, + Action onLink, + Action onInk, + Action onFreeText, + Action onCaret, + Action onText, + Action onStamp, + Action onFileAttachment, + Action onWidget, + Action onRedact, + Action onUnsupported, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "highlight": + onHighlight(AsHighlight()); + break; + case "underline": + onUnderline(AsUnderline()); + break; + case "squiggly": + onSquiggly(AsSquiggly()); + break; + case "strikeout": + onStrikeout(AsStrikeout()); + break; + case "circle": + onCircle(AsCircle()); + break; + case "square": + onSquare(AsSquare()); + break; + case "polygon": + onPolygon(AsPolygon()); + break; + case "polyline": + onPolyline(AsPolyline()); + break; + case "line": + onLine(AsLine()); + break; + case "link": + onLink(AsLink()); + break; + case "ink": + onInk(AsInk()); + break; + case "free-text": + onFreeText(AsFreeText()); + break; + case "caret": + onCaret(AsCaret()); + break; + case "text": + onText(AsText()); + break; + case "stamp": + onStamp(AsStamp()); + break; + case "file-attachment": + onFileAttachment(AsFileAttachment()); + break; + case "widget": + onWidget(AsWidget()); + break; + case "redact": + onRedact(AsRedact()); + break; + case "unsupported": + onUnsupported(AsUnsupported()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsHighlight( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight? value + ) + { + if (Subtype == "highlight") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnderline( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline? value + ) + { + if (Subtype == "underline") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsSquiggly( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly? value + ) + { + if (Subtype == "squiggly") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsStrikeout( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout? value + ) + { + if (Subtype == "strikeout") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsCircle( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle? value + ) + { + if (Subtype == "circle") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsSquare( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare? value + ) + { + if (Subtype == "square") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsPolygon( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon? value + ) + { + if (Subtype == "polygon") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsPolyline( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline? value + ) + { + if (Subtype == "polyline") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsLine( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine? value + ) + { + if (Subtype == "line") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsLink( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink? value + ) + { + if (Subtype == "link") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsInk( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk? value + ) + { + if (Subtype == "ink") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFreeText( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText? value + ) + { + if (Subtype == "free-text") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsCaret( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret? value + ) + { + if (Subtype == "caret") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsText( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText? value + ) + { + if (Subtype == "text") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsStamp( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp? value + ) + { + if (Subtype == "stamp") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFileAttachment( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment? value + ) + { + if (Subtype == "file-attachment") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsWidget( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget? value + ) + { + if (Subtype == "widget") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRedact( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact? value + ) + { + if (Subtype == "redact") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnsupported( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported? value + ) + { + if (Subtype == "unsupported") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Highlight value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Underline value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Squiggly value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Strikeout value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Circle value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Square value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Polygon value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Polyline value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Line value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Link value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Ink value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.FreeText value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Caret value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Text value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Stamp value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.FileAttachment value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Widget value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Redact value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Unsupported value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItem).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItem Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("subtype", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'subtype'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'subtype' is null"); + } + + throw new JsonException( + $"Discriminator property 'subtype' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'subtype' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("subtype"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "highlight" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight" + ), + "underline" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline" + ), + "squiggly" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly" + ), + "strikeout" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout" + ), + "circle" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle" + ), + "square" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare" + ), + "polygon" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon" + ), + "polyline" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline" + ), + "line" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine" + ), + "link" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink" + ), + "ink" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk" + ), + "free-text" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText" + ), + "caret" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret" + ), + "text" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText" + ), + "stamp" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp" + ), + "file-attachment" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment" + ), + "widget" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget" + ), + "redact" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact" + ), + "unsupported" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "highlight" => JsonSerializer.SerializeToNode(value.Value, options), + "underline" => JsonSerializer.SerializeToNode(value.Value, options), + "squiggly" => JsonSerializer.SerializeToNode(value.Value, options), + "strikeout" => JsonSerializer.SerializeToNode(value.Value, options), + "circle" => JsonSerializer.SerializeToNode(value.Value, options), + "square" => JsonSerializer.SerializeToNode(value.Value, options), + "polygon" => JsonSerializer.SerializeToNode(value.Value, options), + "polyline" => JsonSerializer.SerializeToNode(value.Value, options), + "line" => JsonSerializer.SerializeToNode(value.Value, options), + "link" => JsonSerializer.SerializeToNode(value.Value, options), + "ink" => JsonSerializer.SerializeToNode(value.Value, options), + "free-text" => JsonSerializer.SerializeToNode(value.Value, options), + "caret" => JsonSerializer.SerializeToNode(value.Value, options), + "text" => JsonSerializer.SerializeToNode(value.Value, options), + "stamp" => JsonSerializer.SerializeToNode(value.Value, options), + "file-attachment" => JsonSerializer.SerializeToNode(value.Value, options), + "widget" => JsonSerializer.SerializeToNode(value.Value, options), + "redact" => JsonSerializer.SerializeToNode(value.Value, options), + "unsupported" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItem( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for highlight + /// + [Serializable] + public struct Highlight + { + public Highlight( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Highlight( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight value + ) => new(value); + } + + /// + /// Discriminated union type for underline + /// + [Serializable] + public struct Underline + { + public Underline( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Underline( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline value + ) => new(value); + } + + /// + /// Discriminated union type for squiggly + /// + [Serializable] + public struct Squiggly + { + public Squiggly( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Squiggly( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly value + ) => new(value); + } + + /// + /// Discriminated union type for strikeout + /// + [Serializable] + public struct Strikeout + { + public Strikeout( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Strikeout( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout value + ) => new(value); + } + + /// + /// Discriminated union type for circle + /// + [Serializable] + public struct Circle + { + public Circle(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Circle( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle value + ) => new(value); + } + + /// + /// Discriminated union type for square + /// + [Serializable] + public struct Square + { + public Square(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Square( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare value + ) => new(value); + } + + /// + /// Discriminated union type for polygon + /// + [Serializable] + public struct Polygon + { + public Polygon( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Polygon( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon value + ) => new(value); + } + + /// + /// Discriminated union type for polyline + /// + [Serializable] + public struct Polyline + { + public Polyline( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Polyline( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline value + ) => new(value); + } + + /// + /// Discriminated union type for line + /// + [Serializable] + public struct Line + { + public Line(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Line( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine value + ) => new(value); + } + + /// + /// Discriminated union type for link + /// + [Serializable] + public struct Link + { + public Link(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Link( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink value + ) => new(value); + } + + /// + /// Discriminated union type for ink + /// + [Serializable] + public struct Ink + { + public Ink(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Ink( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk value + ) => new(value); + } + + /// + /// Discriminated union type for free-text + /// + [Serializable] + public struct FreeText + { + public FreeText( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.FreeText( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText value + ) => new(value); + } + + /// + /// Discriminated union type for caret + /// + [Serializable] + public struct Caret + { + public Caret(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Caret( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret value + ) => new(value); + } + + /// + /// Discriminated union type for text + /// + [Serializable] + public struct Text + { + public Text(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Text( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText value + ) => new(value); + } + + /// + /// Discriminated union type for stamp + /// + [Serializable] + public struct Stamp + { + public Stamp(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Stamp( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp value + ) => new(value); + } + + /// + /// Discriminated union type for file-attachment + /// + [Serializable] + public struct FileAttachment + { + public FileAttachment( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.FileAttachment( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment value + ) => new(value); + } + + /// + /// Discriminated union type for widget + /// + [Serializable] + public struct Widget + { + public Widget(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Widget( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget value + ) => new(value); + } + + /// + /// Discriminated union type for redact + /// + [Serializable] + public struct Redact + { + public Redact(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Redact( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact value + ) => new(value); + } + + /// + /// Discriminated union type for unsupported + /// + [Serializable] + public struct Unsupported + { + public Unsupported( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItem.Unsupported( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret.cs new file mode 100644 index 0000000..ce8cfc9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret.cs @@ -0,0 +1,103 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaret : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("intent")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent? Intent { get; set; } + + [JsonPropertyName("rectDifferences")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRectDifferences? RectDifferences { get; set; } + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("unrotatedRect")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretUnrotatedRect? UnrotatedRect { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActions.cs new file mode 100644 index 0000000..2141fcd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivate.cs new file mode 100644 index 0000000..40b2004 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRoot.cs new file mode 100644 index 0000000..de9177d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType.cs new file mode 100644 index 0000000..1d734ed --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem.cs new file mode 100644 index 0000000..8db0b83 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlur.cs new file mode 100644 index 0000000..b14c405 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRoot.cs new file mode 100644 index 0000000..efe02e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType.cs new file mode 100644 index 0000000..684df0b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem.cs new file mode 100644 index 0000000..fe99a61 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnter.cs new file mode 100644 index 0000000..f098a25 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRoot.cs new file mode 100644 index 0000000..5ff62f2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType.cs new file mode 100644 index 0000000..6ebadcd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..999cd28 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExit.cs new file mode 100644 index 0000000..0baa8a7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRoot.cs new file mode 100644 index 0000000..e2db8b9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType.cs new file mode 100644 index 0000000..3788a8b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..1f027cc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocus.cs new file mode 100644 index 0000000..8efe05d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRoot.cs new file mode 100644 index 0000000..fb77b97 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType.cs new file mode 100644 index 0000000..b814d14 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem.cs new file mode 100644 index 0000000..4adc403 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDown.cs new file mode 100644 index 0000000..c954841 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRoot.cs new file mode 100644 index 0000000..7febfb9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType.cs new file mode 100644 index 0000000..8bb94a1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..d99c75b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUp.cs new file mode 100644 index 0000000..51bab55 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRoot.cs new file mode 100644 index 0000000..a29d18b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType.cs new file mode 100644 index 0000000..8438fac --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..a56229f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageClose.cs new file mode 100644 index 0000000..369845d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRoot.cs new file mode 100644 index 0000000..787a20d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType.cs new file mode 100644 index 0000000..23ed3ae --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..9a77e12 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisible.cs new file mode 100644 index 0000000..7953d7d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..3412a42 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..8426b3e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..8fa5947 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpen.cs new file mode 100644 index 0000000..c86a482 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRoot.cs new file mode 100644 index 0000000..57c6c11 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType.cs new file mode 100644 index 0000000..a5f1d9e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..f5eb978 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisible.cs new file mode 100644 index 0000000..f897b8b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRoot.cs new file mode 100644 index 0000000..69c61c7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType.cs new file mode 100644 index 0000000..a66573e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..28987d5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode.cs new file mode 100644 index 0000000..f3ac0ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretColor.cs new file mode 100644 index 0000000..c9725e5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretFlags.cs new file mode 100644 index 0000000..acfac64 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality.cs new file mode 100644 index 0000000..c349326 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.cs new file mode 100644 index 0000000..fb9afea --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex.cs new file mode 100644 index 0000000..70de6a5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndexRevision.cs new file mode 100644 index 0000000..bd4ed07 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm.cs new file mode 100644 index 0000000..867850e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber.cs new file mode 100644 index 0000000..c86aa56 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent.cs new file mode 100644 index 0000000..8139dc6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent Replace = + new(Values.Replace); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Replace = "replace"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRect.cs new file mode 100644 index 0000000..22e874f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRectDifferences.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRectDifferences.cs new file mode 100644 index 0000000..ea3146c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRectDifferences.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRectDifferences + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.cs new file mode 100644 index 0000000..b7c1485 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.cs @@ -0,0 +1,410 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex? value + ) + { + if (Kind == "index") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex.cs new file mode 100644 index 0000000..2263847 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndexRevision.cs new file mode 100644 index 0000000..18b79b0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm.cs new file mode 100644 index 0000000..8037079 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber.cs new file mode 100644 index 0000000..45263ed --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType.cs new file mode 100644 index 0000000..6097e82 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretUnrotatedRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretUnrotatedRect.cs new file mode 100644 index 0000000..ecd1928 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretUnrotatedRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCaretUnrotatedRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle.cs new file mode 100644 index 0000000..e8a108f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle.cs @@ -0,0 +1,115 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircle : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("cloudyIntensity")] + public double? CloudyIntensity { get; set; } + + [JsonPropertyName("rectDifferences")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRectDifferences? RectDifferences { get; set; } + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("unrotatedRect")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleUnrotatedRect? UnrotatedRect { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActions.cs new file mode 100644 index 0000000..de684bd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivate.cs new file mode 100644 index 0000000..7a9c69e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRoot.cs new file mode 100644 index 0000000..f6050e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType.cs new file mode 100644 index 0000000..7084a96 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem.cs new file mode 100644 index 0000000..0b496c1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlur.cs new file mode 100644 index 0000000..da9d14f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRoot.cs new file mode 100644 index 0000000..76c6c0c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType.cs new file mode 100644 index 0000000..790ec48 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem.cs new file mode 100644 index 0000000..1139a31 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnter.cs new file mode 100644 index 0000000..6e4fb89 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRoot.cs new file mode 100644 index 0000000..b743819 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType.cs new file mode 100644 index 0000000..da4995f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..b80b160 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExit.cs new file mode 100644 index 0000000..6bcfd7b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRoot.cs new file mode 100644 index 0000000..7129257 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType.cs new file mode 100644 index 0000000..0e304b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..38a0f81 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocus.cs new file mode 100644 index 0000000..af3032c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRoot.cs new file mode 100644 index 0000000..6d80964 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType.cs new file mode 100644 index 0000000..f2463bc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem.cs new file mode 100644 index 0000000..8424caf --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDown.cs new file mode 100644 index 0000000..0f6ac9d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRoot.cs new file mode 100644 index 0000000..e3938c3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType.cs new file mode 100644 index 0000000..4befe75 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..b0fdcfc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUp.cs new file mode 100644 index 0000000..3326195 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRoot.cs new file mode 100644 index 0000000..987c58a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType.cs new file mode 100644 index 0000000..ad8433a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..bc9c7f7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageClose.cs new file mode 100644 index 0000000..e082392 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRoot.cs new file mode 100644 index 0000000..8426aad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType.cs new file mode 100644 index 0000000..a44e1f6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..2cafddd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisible.cs new file mode 100644 index 0000000..8e394cd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..705fd77 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..2619bf7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..c9c282c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpen.cs new file mode 100644 index 0000000..52760a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRoot.cs new file mode 100644 index 0000000..74747b4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType.cs new file mode 100644 index 0000000..4fcd103 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..aca60af --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisible.cs new file mode 100644 index 0000000..1dd0127 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRoot.cs new file mode 100644 index 0000000..49271b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType.cs new file mode 100644 index 0000000..cab564d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..9ba35c1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode.cs new file mode 100644 index 0000000..5288467 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle.cs new file mode 100644 index 0000000..fc4e00f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleColor.cs new file mode 100644 index 0000000..dc240b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleFlags.cs new file mode 100644 index 0000000..f0adaff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality.cs new file mode 100644 index 0000000..158bba3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.cs new file mode 100644 index 0000000..e2ce9f0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex.cs new file mode 100644 index 0000000..c2e6e7c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndexRevision.cs new file mode 100644 index 0000000..49be0aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm.cs new file mode 100644 index 0000000..c32865f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber.cs new file mode 100644 index 0000000..b9121d5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInteriorColor.cs new file mode 100644 index 0000000..68eaba5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRect.cs new file mode 100644 index 0000000..9a15fd6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRectDifferences.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRectDifferences.cs new file mode 100644 index 0000000..93980f2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRectDifferences.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRectDifferences + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.cs new file mode 100644 index 0000000..e49d0a1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.cs @@ -0,0 +1,414 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex.cs new file mode 100644 index 0000000..1804002 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndexRevision.cs new file mode 100644 index 0000000..88042cd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm.cs new file mode 100644 index 0000000..1e0ca8e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber.cs new file mode 100644 index 0000000..abf3984 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType.cs new file mode 100644 index 0000000..198a836 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleUnrotatedRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleUnrotatedRect.cs new file mode 100644 index 0000000..238cf92 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleUnrotatedRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemCircleUnrotatedRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment.cs new file mode 100644 index 0000000..347d33b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment.cs @@ -0,0 +1,98 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachment + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("icon")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon Icon { get; set; } + + [JsonPropertyName("file")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFile File { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActions.cs new file mode 100644 index 0000000..cd22a00 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivate.cs new file mode 100644 index 0000000..18e500b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRoot.cs new file mode 100644 index 0000000..0774987 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType.cs new file mode 100644 index 0000000..01cfc50 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem.cs new file mode 100644 index 0000000..50e6452 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlur.cs new file mode 100644 index 0000000..bec7abb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRoot.cs new file mode 100644 index 0000000..3a0ee77 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType.cs new file mode 100644 index 0000000..579b267 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem.cs new file mode 100644 index 0000000..4ced211 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnter.cs new file mode 100644 index 0000000..de86746 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRoot.cs new file mode 100644 index 0000000..4bfeed6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType.cs new file mode 100644 index 0000000..33849e9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..bd8bf4a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExit.cs new file mode 100644 index 0000000..badf288 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRoot.cs new file mode 100644 index 0000000..9b15e28 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType.cs new file mode 100644 index 0000000..2896500 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..8d85533 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocus.cs new file mode 100644 index 0000000..b178d31 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRoot.cs new file mode 100644 index 0000000..c81932e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType.cs new file mode 100644 index 0000000..8dac7dc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem.cs new file mode 100644 index 0000000..e90d723 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDown.cs new file mode 100644 index 0000000..05388fd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRoot.cs new file mode 100644 index 0000000..34aa461 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType.cs new file mode 100644 index 0000000..41977c1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..ae2d874 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUp.cs new file mode 100644 index 0000000..fb6730f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRoot.cs new file mode 100644 index 0000000..6c1a602 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType.cs new file mode 100644 index 0000000..7a17966 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..04bacf5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageClose.cs new file mode 100644 index 0000000..e0566ef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRoot.cs new file mode 100644 index 0000000..0142bce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType.cs new file mode 100644 index 0000000..95403b8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..03ce0f9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisible.cs new file mode 100644 index 0000000..1594fd3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..b705d96 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..bc8a93b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..f34571e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpen.cs new file mode 100644 index 0000000..af0ee49 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRoot.cs new file mode 100644 index 0000000..19833ac --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType.cs new file mode 100644 index 0000000..1c07973 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..3d91978 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisible.cs new file mode 100644 index 0000000..cefd9ee --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRoot.cs new file mode 100644 index 0000000..9c064b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType.cs new file mode 100644 index 0000000..3d8d4dc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..1cbd900 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode.cs new file mode 100644 index 0000000..c6ec7a3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode.cs @@ -0,0 +1,209 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentColor.cs new file mode 100644 index 0000000..2bece94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFile.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFile.cs new file mode 100644 index 0000000..3383866 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFile.cs @@ -0,0 +1,44 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFile + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required string Name { get; set; } + + [JsonPropertyName("mimeType")] + public string? MimeType { get; set; } + + [JsonPropertyName("description")] + public string? Description { get; set; } + + [JsonPropertyName("size")] + public int? Size { get; set; } + + [JsonPropertyName("checksum")] + public string? Checksum { get; set; } + + [JsonPropertyName("creationDate")] + public string? CreationDate { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFlags.cs new file mode 100644 index 0000000..0ad8ba4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon.cs new file mode 100644 index 0000000..8315b52 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIconSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon PushPin = + new(Values.PushPin); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon Paperclip = + new(Values.Paperclip); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon Graph = + new(Values.Graph); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon Tag = + new(Values.Tag); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIconSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIcon value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string PushPin = "push-pin"; + + public const string Paperclip = "paperclip"; + + public const string Graph = "graph"; + + public const string Tag = "tag"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality.cs new file mode 100644 index 0000000..24f3db6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.cs new file mode 100644 index 0000000..c472402 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex.cs new file mode 100644 index 0000000..10e5e37 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndexRevision.cs new file mode 100644 index 0000000..082b1a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm.cs new file mode 100644 index 0000000..d3872b6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber.cs new file mode 100644 index 0000000..48691c8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRect.cs new file mode 100644 index 0000000..e77c788 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.cs new file mode 100644 index 0000000..de4ae2a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex.cs new file mode 100644 index 0000000..d8c27d8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndexRevision.cs new file mode 100644 index 0000000..7ae46ac --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm.cs new file mode 100644 index 0000000..f00ec45 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber.cs new file mode 100644 index 0000000..dc47d06 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType.cs new file mode 100644 index 0000000..f2ba55b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFileAttachmentReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText.cs new file mode 100644 index 0000000..04856ff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText.cs @@ -0,0 +1,133 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActions? Actions { get; set; } + + [JsonPropertyName("intent")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent Intent { get; set; } + + [JsonPropertyName("fontFamily")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily FontFamily { get; set; } + + [JsonPropertyName("fontSize")] + public required double FontSize { get; set; } + + [JsonPropertyName("textAlign")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign TextAlign { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor Color { get; set; } + + [JsonPropertyName("fontColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontColor? FontColor { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("rectDifferences")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRectDifferences? RectDifferences { get; set; } + + [JsonPropertyName("calloutLine")] + public IEnumerable? CalloutLine { get; set; } + + [JsonPropertyName("lineEnding")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding? LineEnding { get; set; } + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("unrotatedRect")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextUnrotatedRect? UnrotatedRect { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActions.cs new file mode 100644 index 0000000..78fa326 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivate.cs new file mode 100644 index 0000000..2d4da4e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRoot.cs new file mode 100644 index 0000000..70703c6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType.cs new file mode 100644 index 0000000..ada2e94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem.cs new file mode 100644 index 0000000..65d8d05 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlur.cs new file mode 100644 index 0000000..3125e97 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRoot.cs new file mode 100644 index 0000000..2197d07 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType.cs new file mode 100644 index 0000000..b830b10 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem.cs new file mode 100644 index 0000000..1d97b85 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnter.cs new file mode 100644 index 0000000..f712854 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRoot.cs new file mode 100644 index 0000000..1f16a05 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType.cs new file mode 100644 index 0000000..f07188f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..995b292 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExit.cs new file mode 100644 index 0000000..8c4f5c7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRoot.cs new file mode 100644 index 0000000..b527ac5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType.cs new file mode 100644 index 0000000..828e689 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..6f1c6e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocus.cs new file mode 100644 index 0000000..cd68e98 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRoot.cs new file mode 100644 index 0000000..30a5199 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType.cs new file mode 100644 index 0000000..66299ad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem.cs new file mode 100644 index 0000000..6f49838 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDown.cs new file mode 100644 index 0000000..34353cc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRoot.cs new file mode 100644 index 0000000..d420de2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType.cs new file mode 100644 index 0000000..603a1d9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..336410b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUp.cs new file mode 100644 index 0000000..156fb12 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRoot.cs new file mode 100644 index 0000000..ed9f485 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType.cs new file mode 100644 index 0000000..c959247 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..de47b75 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageClose.cs new file mode 100644 index 0000000..7320e1d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRoot.cs new file mode 100644 index 0000000..9047da3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType.cs new file mode 100644 index 0000000..052e6ef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..4b6489c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisible.cs new file mode 100644 index 0000000..0b5e5df --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..81ce946 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..7b95cd1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..713cab5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpen.cs new file mode 100644 index 0000000..4a06ac8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRoot.cs new file mode 100644 index 0000000..e30bfbe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType.cs new file mode 100644 index 0000000..4faa846 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..dfe731d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisible.cs new file mode 100644 index 0000000..7fd07f6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRoot.cs new file mode 100644 index 0000000..2af54d6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType.cs new file mode 100644 index 0000000..295a813 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..b241511 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode.cs new file mode 100644 index 0000000..ffe2503 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle.cs new file mode 100644 index 0000000..fa44876 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor.cs new file mode 100644 index 0000000..5786336 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFlags.cs new file mode 100644 index 0000000..8b78267 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontColor.cs new file mode 100644 index 0000000..b71c511 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.cs new file mode 100644 index 0000000..9e34de7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.cs @@ -0,0 +1,197 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamilySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily Courier = + new(Values.Courier); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily CourierBold = + new(Values.CourierBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily CourierBoldOblique = + new(Values.CourierBoldOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily CourierOblique = + new(Values.CourierOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily Helvetica = + new(Values.Helvetica); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily HelveticaBold = + new(Values.HelveticaBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily HelveticaBoldOblique = + new(Values.HelveticaBoldOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily HelveticaOblique = + new(Values.HelveticaOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily TimesRoman = + new(Values.TimesRoman); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily TimesBold = + new(Values.TimesBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily TimesBoldItalic = + new(Values.TimesBoldItalic); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily TimesItalic = + new(Values.TimesItalic); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily Symbol = + new(Values.Symbol); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily ZapfDingbats = + new(Values.ZapfDingbats); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamilySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Courier = "courier"; + + public const string CourierBold = "courier-bold"; + + public const string CourierBoldOblique = "courier-bold-oblique"; + + public const string CourierOblique = "courier-oblique"; + + public const string Helvetica = "helvetica"; + + public const string HelveticaBold = "helvetica-bold"; + + public const string HelveticaBoldOblique = "helvetica-bold-oblique"; + + public const string HelveticaOblique = "helvetica-oblique"; + + public const string TimesRoman = "times-roman"; + + public const string TimesBold = "times-bold"; + + public const string TimesBoldItalic = "times-bold-italic"; + + public const string TimesItalic = "times-italic"; + + public const string Symbol = "symbol"; + + public const string ZapfDingbats = "zapf-dingbats"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality.cs new file mode 100644 index 0000000..138f5d2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.cs new file mode 100644 index 0000000..18dfd14 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex.cs new file mode 100644 index 0000000..ab71d28 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndexRevision.cs new file mode 100644 index 0000000..9e510e8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm.cs new file mode 100644 index 0000000..4482fb6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber.cs new file mode 100644 index 0000000..aa60c90 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent.cs new file mode 100644 index 0000000..cb07b8a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent FreeText = + new(Values.FreeText); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent FreeTextCallout = + new(Values.FreeTextCallout); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string FreeText = "free-text"; + + public const string FreeTextCallout = "free-text-callout"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInteriorColor.cs new file mode 100644 index 0000000..6e75339 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding.cs new file mode 100644 index 0000000..65f4a82 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding.cs @@ -0,0 +1,177 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEndingSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding None = + new(Values.None); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding Square = + new(Values.Square); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding Circle = + new(Values.Circle); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding Diamond = + new(Values.Diamond); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding OpenArrow = + new(Values.OpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding ClosedArrow = + new(Values.ClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding Butt = + new(Values.Butt); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding ROpenArrow = + new(Values.ROpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding RClosedArrow = + new(Values.RClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding Slash = + new(Values.Slash); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEndingSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextLineEnding value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string None = "none"; + + public const string Square = "square"; + + public const string Circle = "circle"; + + public const string Diamond = "diamond"; + + public const string OpenArrow = "open-arrow"; + + public const string ClosedArrow = "closed-arrow"; + + public const string Butt = "butt"; + + public const string ROpenArrow = "r-open-arrow"; + + public const string RClosedArrow = "r-closed-arrow"; + + public const string Slash = "slash"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRect.cs new file mode 100644 index 0000000..c4736ab --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRectDifferences.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRectDifferences.cs new file mode 100644 index 0000000..ae3a87b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRectDifferences.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRectDifferences + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.cs new file mode 100644 index 0000000..5117f98 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.cs @@ -0,0 +1,417 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex.cs new file mode 100644 index 0000000..1b8f9ed --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndexRevision.cs new file mode 100644 index 0000000..7d7421e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm.cs new file mode 100644 index 0000000..f8d8fc7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber.cs new file mode 100644 index 0000000..18ed11a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType.cs new file mode 100644 index 0000000..6ca4533 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign.cs new file mode 100644 index 0000000..5829fb8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign.cs @@ -0,0 +1,140 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlignSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign Left = + new(Values.Left); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign Center = + new(Values.Center); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign Right = + new(Values.Right); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlignSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextTextAlign value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Left = "left"; + + public const string Center = "center"; + + public const string Right = "right"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextUnrotatedRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextUnrotatedRect.cs new file mode 100644 index 0000000..6872c5e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextUnrotatedRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextUnrotatedRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight.cs new file mode 100644 index 0000000..a4bef65 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight.cs @@ -0,0 +1,96 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlight + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("quadPoints")] + public IEnumerable QuadPoints { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActions.cs new file mode 100644 index 0000000..c7bbeec --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivate.cs new file mode 100644 index 0000000..d9cf574 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRoot.cs new file mode 100644 index 0000000..768ddac --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType.cs new file mode 100644 index 0000000..6c0a760 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem.cs new file mode 100644 index 0000000..fac159e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlur.cs new file mode 100644 index 0000000..0b38cee --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRoot.cs new file mode 100644 index 0000000..3fe2990 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType.cs new file mode 100644 index 0000000..7205582 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem.cs new file mode 100644 index 0000000..b950375 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnter.cs new file mode 100644 index 0000000..95649f5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRoot.cs new file mode 100644 index 0000000..d573127 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType.cs new file mode 100644 index 0000000..28805d6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..c57e3ff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExit.cs new file mode 100644 index 0000000..4f8c1f6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRoot.cs new file mode 100644 index 0000000..cb40094 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType.cs new file mode 100644 index 0000000..42f3612 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..13b99e7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocus.cs new file mode 100644 index 0000000..f7fff50 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRoot.cs new file mode 100644 index 0000000..d559b53 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType.cs new file mode 100644 index 0000000..d3231b9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem.cs new file mode 100644 index 0000000..eac06d5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDown.cs new file mode 100644 index 0000000..10b6a25 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRoot.cs new file mode 100644 index 0000000..012315d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType.cs new file mode 100644 index 0000000..3b42d8d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..160e836 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUp.cs new file mode 100644 index 0000000..3f5685e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRoot.cs new file mode 100644 index 0000000..b363495 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType.cs new file mode 100644 index 0000000..5353b1c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..834ad4e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageClose.cs new file mode 100644 index 0000000..7311203 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRoot.cs new file mode 100644 index 0000000..d9cc123 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType.cs new file mode 100644 index 0000000..cfa77f5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..d5eb069 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisible.cs new file mode 100644 index 0000000..c306ab2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..13d1efd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..6d2ad0e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..f24edbc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpen.cs new file mode 100644 index 0000000..6ad8bb9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRoot.cs new file mode 100644 index 0000000..419016f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType.cs new file mode 100644 index 0000000..44a6f92 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..4a0e789 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisible.cs new file mode 100644 index 0000000..0732a4c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRoot.cs new file mode 100644 index 0000000..6712665 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType.cs new file mode 100644 index 0000000..63418b8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..1719ada --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode.cs new file mode 100644 index 0000000..7cad70b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode.cs @@ -0,0 +1,207 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightColor.cs new file mode 100644 index 0000000..c9407e8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightFlags.cs new file mode 100644 index 0000000..223a64a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality.cs new file mode 100644 index 0000000..c61c3dc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.cs new file mode 100644 index 0000000..4e18632 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex.cs new file mode 100644 index 0000000..662bb1d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndexRevision.cs new file mode 100644 index 0000000..45d6d08 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm.cs new file mode 100644 index 0000000..3ddb5a5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber.cs new file mode 100644 index 0000000..3453663 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItem.cs new file mode 100644 index 0000000..1da134b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItem.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("p1")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP1 P1 { get; set; } + + [JsonPropertyName("p2")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP2 P2 { get; set; } + + [JsonPropertyName("p3")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP3 P3 { get; set; } + + [JsonPropertyName("p4")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP4 P4 { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP1.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP1.cs new file mode 100644 index 0000000..f74a3dd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP1.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP1 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP2.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP2.cs new file mode 100644 index 0000000..ef7dd81 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP2.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP2 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP3.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP3.cs new file mode 100644 index 0000000..30f2a26 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP3.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP3 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP4.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP4.cs new file mode 100644 index 0000000..7dd3aaa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP4.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightQuadPointsItemP4 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRect.cs new file mode 100644 index 0000000..369d1c8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.cs new file mode 100644 index 0000000..7c69446 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex.cs new file mode 100644 index 0000000..9fc2ed8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndexRevision.cs new file mode 100644 index 0000000..11041cc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm.cs new file mode 100644 index 0000000..3273315 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber.cs new file mode 100644 index 0000000..b6cd984 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType.cs new file mode 100644 index 0000000..9236cce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemHighlightReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk.cs new file mode 100644 index 0000000..03bc9e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk.cs @@ -0,0 +1,114 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInk : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("intent")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent? Intent { get; set; } + + [JsonPropertyName("inkList")] + public IEnumerable< + IEnumerable + > InkList { get; set; } = + new List< + IEnumerable + >(); + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActions.cs new file mode 100644 index 0000000..4c2dc48 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivate.cs new file mode 100644 index 0000000..ecbe9e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRoot.cs new file mode 100644 index 0000000..fee88be --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType.cs new file mode 100644 index 0000000..5f7d821 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem.cs new file mode 100644 index 0000000..d0acae0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlur.cs new file mode 100644 index 0000000..9594a94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRoot.cs new file mode 100644 index 0000000..87491bc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType.cs new file mode 100644 index 0000000..8889a8e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem.cs new file mode 100644 index 0000000..c7efced --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnter.cs new file mode 100644 index 0000000..14a7e0c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRoot.cs new file mode 100644 index 0000000..1c02f3c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType.cs new file mode 100644 index 0000000..5a2ffbe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..98d4760 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExit.cs new file mode 100644 index 0000000..8c6dd19 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRoot.cs new file mode 100644 index 0000000..1f33f7d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType.cs new file mode 100644 index 0000000..ecc9b4a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..2516eab --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocus.cs new file mode 100644 index 0000000..7b8ed79 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRoot.cs new file mode 100644 index 0000000..e4cacc7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType.cs new file mode 100644 index 0000000..fecb0f4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem.cs new file mode 100644 index 0000000..354106f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDown.cs new file mode 100644 index 0000000..efe3bf3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRoot.cs new file mode 100644 index 0000000..9022c74 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType.cs new file mode 100644 index 0000000..9030bbc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..7358a63 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUp.cs new file mode 100644 index 0000000..2a57869 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRoot.cs new file mode 100644 index 0000000..464a67b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType.cs new file mode 100644 index 0000000..2f41e76 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..c195c4d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageClose.cs new file mode 100644 index 0000000..7144d03 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRoot.cs new file mode 100644 index 0000000..bcff25f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType.cs new file mode 100644 index 0000000..d7a8bf5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..1989a76 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisible.cs new file mode 100644 index 0000000..388d75e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..26c883a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..8c2be17 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..3d2c023 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpen.cs new file mode 100644 index 0000000..aefda10 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRoot.cs new file mode 100644 index 0000000..63bed60 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType.cs new file mode 100644 index 0000000..6f6719c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..db002d4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisible.cs new file mode 100644 index 0000000..f721431 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRoot.cs new file mode 100644 index 0000000..0b1c53c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType.cs new file mode 100644 index 0000000..ffb8cba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..a7fb361 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode.cs new file mode 100644 index 0000000..fec5c98 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle.cs new file mode 100644 index 0000000..9f8dd82 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkColor.cs new file mode 100644 index 0000000..62c9714 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkColor.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkColor : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkFlags.cs new file mode 100644 index 0000000..a2a32cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkFlags.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkFlags : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality.cs new file mode 100644 index 0000000..08bd0b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.cs new file mode 100644 index 0000000..249b1cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex.cs new file mode 100644 index 0000000..0a34619 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndexRevision.cs new file mode 100644 index 0000000..8bf3588 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm.cs new file mode 100644 index 0000000..c8934d3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber.cs new file mode 100644 index 0000000..c0b22ed --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInkListItemItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInkListItemItem.cs new file mode 100644 index 0000000..cf962a3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInkListItemItem.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkInkListItemItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent.cs new file mode 100644 index 0000000..4aacaa1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent InkHighlight = + new(Values.InkHighlight); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string InkHighlight = "ink-highlight"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRect.cs new file mode 100644 index 0000000..dec5413 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRect.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRect : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.cs new file mode 100644 index 0000000..eb809da --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.cs @@ -0,0 +1,410 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex? value + ) + { + if (Kind == "index") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex.cs new file mode 100644 index 0000000..274d2ba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndexRevision.cs new file mode 100644 index 0000000..a6463bb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm.cs new file mode 100644 index 0000000..6c91436 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefNm : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber.cs new file mode 100644 index 0000000..8a4f85c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType.cs new file mode 100644 index 0000000..5af19f1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemInkReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs new file mode 100644 index 0000000..830b3f5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs @@ -0,0 +1,112 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("linePoints")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePoints LinePoints { get; set; } + + [JsonPropertyName("lineEndings")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndings LineEndings { get; set; } + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActions.cs new file mode 100644 index 0000000..a55e322 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivate.cs new file mode 100644 index 0000000..8910767 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRoot.cs new file mode 100644 index 0000000..75a2565 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType.cs new file mode 100644 index 0000000..a4a368b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem.cs new file mode 100644 index 0000000..221b854 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlur.cs new file mode 100644 index 0000000..0dfe7fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRoot.cs new file mode 100644 index 0000000..833a1a2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType.cs new file mode 100644 index 0000000..74667dc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem.cs new file mode 100644 index 0000000..871f47d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnter.cs new file mode 100644 index 0000000..237c6f9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRoot.cs new file mode 100644 index 0000000..52930cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType.cs new file mode 100644 index 0000000..3ba86b9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..1688b49 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExit.cs new file mode 100644 index 0000000..ad370d1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRoot.cs new file mode 100644 index 0000000..a947d7f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType.cs new file mode 100644 index 0000000..2402a5e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..8c2edf9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocus.cs new file mode 100644 index 0000000..387807f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRoot.cs new file mode 100644 index 0000000..0a8ea55 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType.cs new file mode 100644 index 0000000..48941f8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem.cs new file mode 100644 index 0000000..992b32a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDown.cs new file mode 100644 index 0000000..cda74c4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRoot.cs new file mode 100644 index 0000000..81b505a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType.cs new file mode 100644 index 0000000..8db60fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..d806c50 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUp.cs new file mode 100644 index 0000000..aa55f6e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRoot.cs new file mode 100644 index 0000000..40cf737 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType.cs new file mode 100644 index 0000000..21f7e92 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..452902c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageClose.cs new file mode 100644 index 0000000..583c32e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRoot.cs new file mode 100644 index 0000000..b287083 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType.cs new file mode 100644 index 0000000..020ed23 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..0334bb2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisible.cs new file mode 100644 index 0000000..445a3a2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..854dd88 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..7ad239f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..ec8812a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpen.cs new file mode 100644 index 0000000..8cfe17f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRoot.cs new file mode 100644 index 0000000..2ca6840 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType.cs new file mode 100644 index 0000000..fc94674 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..7383249 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisible.cs new file mode 100644 index 0000000..10d12cc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRoot.cs new file mode 100644 index 0000000..1ff2031 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType.cs new file mode 100644 index 0000000..764db4a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..2f0581d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode.cs new file mode 100644 index 0000000..7900c94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle.cs new file mode 100644 index 0000000..1880d21 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineColor.cs new file mode 100644 index 0000000..e3f06a8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineFlags.cs new file mode 100644 index 0000000..1fc0b16 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality.cs new file mode 100644 index 0000000..6f2afdd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.cs new file mode 100644 index 0000000..66029aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex.cs new file mode 100644 index 0000000..eb605a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndexRevision.cs new file mode 100644 index 0000000..6380932 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm.cs new file mode 100644 index 0000000..bcf0b0d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber.cs new file mode 100644 index 0000000..f2caf45 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInteriorColor.cs new file mode 100644 index 0000000..cb75d8e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndings.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndings.cs new file mode 100644 index 0000000..69996ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndings.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndings + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("start")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Start { get; set; } + + [JsonPropertyName("end")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd End { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd.cs new file mode 100644 index 0000000..21eab2d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd.cs @@ -0,0 +1,177 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEndSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd None = + new(Values.None); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd Square = + new(Values.Square); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd Circle = + new(Values.Circle); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd Diamond = + new(Values.Diamond); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd OpenArrow = + new(Values.OpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd ClosedArrow = + new(Values.ClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd Butt = + new(Values.Butt); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd ROpenArrow = + new(Values.ROpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd RClosedArrow = + new(Values.RClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd Slash = + new(Values.Slash); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEndSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsEnd value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string None = "none"; + + public const string Square = "square"; + + public const string Circle = "circle"; + + public const string Diamond = "diamond"; + + public const string OpenArrow = "open-arrow"; + + public const string ClosedArrow = "closed-arrow"; + + public const string Butt = "butt"; + + public const string ROpenArrow = "r-open-arrow"; + + public const string RClosedArrow = "r-closed-arrow"; + + public const string Slash = "slash"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart.cs new file mode 100644 index 0000000..fa9960f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart.cs @@ -0,0 +1,179 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStartSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart None = + new(Values.None); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Square = + new(Values.Square); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Circle = + new(Values.Circle); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Diamond = + new(Values.Diamond); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart OpenArrow = + new(Values.OpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart ClosedArrow = + new(Values.ClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Butt = + new(Values.Butt); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart ROpenArrow = + new(Values.ROpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart RClosedArrow = + new(Values.RClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Slash = + new(Values.Slash); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStartSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLineEndingsStart value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string None = "none"; + + public const string Square = "square"; + + public const string Circle = "circle"; + + public const string Diamond = "diamond"; + + public const string OpenArrow = "open-arrow"; + + public const string ClosedArrow = "closed-arrow"; + + public const string Butt = "butt"; + + public const string ROpenArrow = "r-open-arrow"; + + public const string RClosedArrow = "r-closed-arrow"; + + public const string Slash = "slash"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePoints.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePoints.cs new file mode 100644 index 0000000..3564209 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePoints.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePoints + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("start")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsStart Start { get; set; } + + [JsonPropertyName("end")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsEnd End { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsEnd.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsEnd.cs new file mode 100644 index 0000000..cde2cf2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsEnd.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsEnd + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsStart.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsStart.cs new file mode 100644 index 0000000..b5c12c7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsStart.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLinePointsStart + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRect.cs new file mode 100644 index 0000000..8b3aaa6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRect.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRect : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.cs new file mode 100644 index 0000000..5a5ea54 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.cs @@ -0,0 +1,410 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex? value + ) + { + if (Kind == "index") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex.cs new file mode 100644 index 0000000..f054bdc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndexRevision.cs new file mode 100644 index 0000000..c0ba1b4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm.cs new file mode 100644 index 0000000..e56b68a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber.cs new file mode 100644 index 0000000..85f40ff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType.cs new file mode 100644 index 0000000..edabd8f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink.cs new file mode 100644 index 0000000..9050c2e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink.cs @@ -0,0 +1,88 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLink : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActions? Actions { get; set; } + + [JsonPropertyName("target")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget? Target { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActions.cs new file mode 100644 index 0000000..d8ed903 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivate.cs new file mode 100644 index 0000000..b755e2e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRoot.cs new file mode 100644 index 0000000..4046845 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType.cs new file mode 100644 index 0000000..ad093d9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem.cs new file mode 100644 index 0000000..effb932 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlur.cs new file mode 100644 index 0000000..2e01995 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRoot.cs new file mode 100644 index 0000000..975368b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType.cs new file mode 100644 index 0000000..e2f9c43 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem.cs new file mode 100644 index 0000000..54e351b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnter.cs new file mode 100644 index 0000000..457c836 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRoot.cs new file mode 100644 index 0000000..b983f42 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType.cs new file mode 100644 index 0000000..74260d1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..8541515 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExit.cs new file mode 100644 index 0000000..8c56e92 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRoot.cs new file mode 100644 index 0000000..1861f1e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType.cs new file mode 100644 index 0000000..adfc6c5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..82bc541 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocus.cs new file mode 100644 index 0000000..7685ee6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRoot.cs new file mode 100644 index 0000000..d8d4493 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType.cs new file mode 100644 index 0000000..304fb57 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem.cs new file mode 100644 index 0000000..09e7217 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDown.cs new file mode 100644 index 0000000..14cb384 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRoot.cs new file mode 100644 index 0000000..8646cd7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType.cs new file mode 100644 index 0000000..7bc49b0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..1d9a1a1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUp.cs new file mode 100644 index 0000000..271f74a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRoot.cs new file mode 100644 index 0000000..34e865b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType.cs new file mode 100644 index 0000000..138851b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..bf083a9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageClose.cs new file mode 100644 index 0000000..b4dc6c0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRoot.cs new file mode 100644 index 0000000..974ae5d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType.cs new file mode 100644 index 0000000..cb80f13 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..1c1d165 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisible.cs new file mode 100644 index 0000000..55dc970 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..e16725d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..3414f86 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..190c1b8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpen.cs new file mode 100644 index 0000000..9e43943 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRoot.cs new file mode 100644 index 0000000..a266598 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType.cs new file mode 100644 index 0000000..9ef5981 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..3587b61 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisible.cs new file mode 100644 index 0000000..96e30fe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRoot.cs new file mode 100644 index 0000000..c737f94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType.cs new file mode 100644 index 0000000..bfa55c2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..b522bbc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode.cs new file mode 100644 index 0000000..6548e2d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkFlags.cs new file mode 100644 index 0000000..83600ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality.cs new file mode 100644 index 0000000..4246e5f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.cs new file mode 100644 index 0000000..55c3527 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex.cs new file mode 100644 index 0000000..9eda28a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndexRevision.cs new file mode 100644 index 0000000..5cd933d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm.cs new file mode 100644 index 0000000..01c9fd8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber.cs new file mode 100644 index 0000000..7b519bc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRect.cs new file mode 100644 index 0000000..9c45ed4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRect.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRect : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.cs new file mode 100644 index 0000000..e073850 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.cs @@ -0,0 +1,410 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex? value + ) + { + if (Kind == "index") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex.cs new file mode 100644 index 0000000..550f534 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndexRevision.cs new file mode 100644 index 0000000..eb44174 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm.cs new file mode 100644 index 0000000..8f99ab4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber.cs new file mode 100644 index 0000000..c0b792d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType.cs new file mode 100644 index 0000000..f6a661d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.cs new file mode 100644 index 0000000..dde8218 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.cs @@ -0,0 +1,773 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Goto value + ) + { + Kind = "goto"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Uri value + ) + { + Kind = "uri"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.GotoRemote value + ) + { + Kind = "goto-remote"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Launch value + ) + { + Kind = "launch"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Javascript value + ) + { + Kind = "javascript"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Named value + ) + { + Kind = "named"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Unsupported value + ) + { + Kind = "unsupported"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "goto" + /// + public bool IsGoto => Kind == "goto"; + + /// + /// Returns true if is "uri" + /// + public bool IsUri => Kind == "uri"; + + /// + /// Returns true if is "goto-remote" + /// + public bool IsGotoRemote => Kind == "goto-remote"; + + /// + /// Returns true if is "launch" + /// + public bool IsLaunch => Kind == "launch"; + + /// + /// Returns true if is "javascript" + /// + public bool IsJavascript => Kind == "javascript"; + + /// + /// Returns true if is "named" + /// + public bool IsNamed => Kind == "named"; + + /// + /// Returns true if is "unsupported" + /// + public bool IsUnsupported => Kind == "unsupported"; + + /// + /// Returns the value as a if is 'goto', otherwise throws an exception. + /// + /// Thrown when is not 'goto'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto AsGoto() => + IsGoto + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'goto'" + ); + + /// + /// Returns the value as a if is 'uri', otherwise throws an exception. + /// + /// Thrown when is not 'uri'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri AsUri() => + IsUri + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'uri'" + ); + + /// + /// Returns the value as a if is 'goto-remote', otherwise throws an exception. + /// + /// Thrown when is not 'goto-remote'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote AsGotoRemote() => + IsGotoRemote + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'goto-remote'" + ); + + /// + /// Returns the value as a if is 'launch', otherwise throws an exception. + /// + /// Thrown when is not 'launch'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch AsLaunch() => + IsLaunch + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'launch'" + ); + + /// + /// Returns the value as a if is 'javascript', otherwise throws an exception. + /// + /// Thrown when is not 'javascript'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript AsJavascript() => + IsJavascript + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'javascript'" + ); + + /// + /// Returns the value as a if is 'named', otherwise throws an exception. + /// + /// Thrown when is not 'named'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed AsNamed() => + IsNamed + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'named'" + ); + + /// + /// Returns the value as a if is 'unsupported', otherwise throws an exception. + /// + /// Thrown when is not 'unsupported'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported AsUnsupported() => + IsUnsupported + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Kind is not 'unsupported'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto, + T + > onGoto, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri, + T + > onUri, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote, + T + > onGotoRemote, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch, + T + > onLaunch, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript, + T + > onJavascript, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed, + T + > onNamed, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported, + T + > onUnsupported, + Func onUnknown_ + ) + { + return Kind switch + { + "goto" => onGoto(AsGoto()), + "uri" => onUri(AsUri()), + "goto-remote" => onGotoRemote(AsGotoRemote()), + "launch" => onLaunch(AsLaunch()), + "javascript" => onJavascript(AsJavascript()), + "named" => onNamed(AsNamed()), + "unsupported" => onUnsupported(AsUnsupported()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onGoto, + Action onUri, + Action onGotoRemote, + Action onLaunch, + Action onJavascript, + Action onNamed, + Action onUnsupported, + Action onUnknown_ + ) + { + switch (Kind) + { + case "goto": + onGoto(AsGoto()); + break; + case "uri": + onUri(AsUri()); + break; + case "goto-remote": + onGotoRemote(AsGotoRemote()); + break; + case "launch": + onLaunch(AsLaunch()); + break; + case "javascript": + onJavascript(AsJavascript()); + break; + case "named": + onNamed(AsNamed()); + break; + case "unsupported": + onUnsupported(AsUnsupported()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGoto( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto? value + ) + { + if (Kind == "goto") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUri( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri? value + ) + { + if (Kind == "uri") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGotoRemote( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote? value + ) + { + if (Kind == "goto-remote") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsLaunch( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch? value + ) + { + if (Kind == "launch") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsJavascript( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript? value + ) + { + if (Kind == "javascript") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNamed( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed? value + ) + { + if (Kind == "named") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnsupported( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported? value + ) + { + if (Kind == "unsupported") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Goto value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Uri value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.GotoRemote value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Launch value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Javascript value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Named value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Unsupported value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "goto" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto" + ), + "uri" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri" + ), + "goto-remote" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote" + ), + "launch" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch" + ), + "javascript" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript" + ), + "named" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed" + ), + "unsupported" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "goto" => JsonSerializer.SerializeToNode(value.Value, options), + "uri" => JsonSerializer.SerializeToNode(value.Value, options), + "goto-remote" => JsonSerializer.SerializeToNode(value.Value, options), + "launch" => JsonSerializer.SerializeToNode(value.Value, options), + "javascript" => JsonSerializer.SerializeToNode(value.Value, options), + "named" => JsonSerializer.SerializeToNode(value.Value, options), + "unsupported" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for goto + /// + [Serializable] + public struct Goto + { + public Goto( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Goto( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto value + ) => new(value); + } + + /// + /// Discriminated union type for uri + /// + [Serializable] + public struct Uri + { + public Uri( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Uri( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri value + ) => new(value); + } + + /// + /// Discriminated union type for goto-remote + /// + [Serializable] + public struct GotoRemote + { + public GotoRemote( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.GotoRemote( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote value + ) => new(value); + } + + /// + /// Discriminated union type for launch + /// + [Serializable] + public struct Launch + { + public Launch( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Launch( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch value + ) => new(value); + } + + /// + /// Discriminated union type for javascript + /// + [Serializable] + public struct Javascript + { + public Javascript( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Javascript( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript value + ) => new(value); + } + + /// + /// Discriminated union type for named + /// + [Serializable] + public struct Named + { + public Named( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Named( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed value + ) => new(value); + } + + /// + /// Discriminated union type for unsupported + /// + [Serializable] + public struct Unsupported + { + public Unsupported( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTarget.Unsupported( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto.cs new file mode 100644 index 0000000..743d154 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGoto + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("destination")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination Destination { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.cs new file mode 100644 index 0000000..54c0db6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.cs @@ -0,0 +1,864 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Xyz value + ) + { + Kind = "xyz"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Fit value + ) + { + Kind = "fit"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitH value + ) + { + Kind = "fitH"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitV value + ) + { + Kind = "fitV"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitR value + ) + { + Kind = "fitR"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitB value + ) + { + Kind = "fitB"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitBh value + ) + { + Kind = "fitBH"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitBv value + ) + { + Kind = "fitBV"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "xyz" + /// + public bool IsXyz => Kind == "xyz"; + + /// + /// Returns true if is "fit" + /// + public bool IsFit => Kind == "fit"; + + /// + /// Returns true if is "fitH" + /// + public bool IsFitH => Kind == "fitH"; + + /// + /// Returns true if is "fitV" + /// + public bool IsFitV => Kind == "fitV"; + + /// + /// Returns true if is "fitR" + /// + public bool IsFitR => Kind == "fitR"; + + /// + /// Returns true if is "fitB" + /// + public bool IsFitB => Kind == "fitB"; + + /// + /// Returns true if is "fitBH" + /// + public bool IsFitBh => Kind == "fitBH"; + + /// + /// Returns true if is "fitBV" + /// + public bool IsFitBv => Kind == "fitBV"; + + /// + /// Returns the value as a if is 'xyz', otherwise throws an exception. + /// + /// Thrown when is not 'xyz'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz AsXyz() => + IsXyz + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'xyz'" + ); + + /// + /// Returns the value as a if is 'fit', otherwise throws an exception. + /// + /// Thrown when is not 'fit'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit AsFit() => + IsFit + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fit'" + ); + + /// + /// Returns the value as a if is 'fitH', otherwise throws an exception. + /// + /// Thrown when is not 'fitH'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH AsFitH() => + IsFitH + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fitH'" + ); + + /// + /// Returns the value as a if is 'fitV', otherwise throws an exception. + /// + /// Thrown when is not 'fitV'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV AsFitV() => + IsFitV + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fitV'" + ); + + /// + /// Returns the value as a if is 'fitR', otherwise throws an exception. + /// + /// Thrown when is not 'fitR'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR AsFitR() => + IsFitR + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fitR'" + ); + + /// + /// Returns the value as a if is 'fitB', otherwise throws an exception. + /// + /// Thrown when is not 'fitB'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB AsFitB() => + IsFitB + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fitB'" + ); + + /// + /// Returns the value as a if is 'fitBH', otherwise throws an exception. + /// + /// Thrown when is not 'fitBH'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh AsFitBh() => + IsFitBh + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fitBH'" + ); + + /// + /// Returns the value as a if is 'fitBV', otherwise throws an exception. + /// + /// Thrown when is not 'fitBV'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv AsFitBv() => + IsFitBv + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Kind is not 'fitBV'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz, + T + > onXyz, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit, + T + > onFit, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH, + T + > onFitH, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV, + T + > onFitV, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR, + T + > onFitR, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB, + T + > onFitB, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh, + T + > onFitBh, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv, + T + > onFitBv, + Func onUnknown_ + ) + { + return Kind switch + { + "xyz" => onXyz(AsXyz()), + "fit" => onFit(AsFit()), + "fitH" => onFitH(AsFitH()), + "fitV" => onFitV(AsFitV()), + "fitR" => onFitR(AsFitR()), + "fitB" => onFitB(AsFitB()), + "fitBH" => onFitBh(AsFitBh()), + "fitBV" => onFitBv(AsFitBv()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onXyz, + Action onFit, + Action onFitH, + Action onFitV, + Action onFitR, + Action onFitB, + Action onFitBh, + Action onFitBv, + Action onUnknown_ + ) + { + switch (Kind) + { + case "xyz": + onXyz(AsXyz()); + break; + case "fit": + onFit(AsFit()); + break; + case "fitH": + onFitH(AsFitH()); + break; + case "fitV": + onFitV(AsFitV()); + break; + case "fitR": + onFitR(AsFitR()); + break; + case "fitB": + onFitB(AsFitB()); + break; + case "fitBH": + onFitBh(AsFitBh()); + break; + case "fitBV": + onFitBv(AsFitBv()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsXyz( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz? value + ) + { + if (Kind == "xyz") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFit( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit? value + ) + { + if (Kind == "fit") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFitH( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH? value + ) + { + if (Kind == "fitH") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFitV( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV? value + ) + { + if (Kind == "fitV") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFitR( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR? value + ) + { + if (Kind == "fitR") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFitB( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB? value + ) + { + if (Kind == "fitB") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFitBh( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh? value + ) + { + if (Kind == "fitBH") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsFitBv( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv? value + ) + { + if (Kind == "fitBV") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Xyz value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Fit value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitH value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitV value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitR value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitB value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitBh value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitBv value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "xyz" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz" + ), + "fit" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit" + ), + "fitH" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH" + ), + "fitV" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV" + ), + "fitR" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR" + ), + "fitB" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB" + ), + "fitBH" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh" + ), + "fitBV" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "xyz" => JsonSerializer.SerializeToNode(value.Value, options), + "fit" => JsonSerializer.SerializeToNode(value.Value, options), + "fitH" => JsonSerializer.SerializeToNode(value.Value, options), + "fitV" => JsonSerializer.SerializeToNode(value.Value, options), + "fitR" => JsonSerializer.SerializeToNode(value.Value, options), + "fitB" => JsonSerializer.SerializeToNode(value.Value, options), + "fitBH" => JsonSerializer.SerializeToNode(value.Value, options), + "fitBV" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for xyz + /// + [Serializable] + public struct Xyz + { + public Xyz( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Xyz( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz value + ) => new(value); + } + + /// + /// Discriminated union type for fit + /// + [Serializable] + public struct Fit + { + public Fit( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.Fit( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit value + ) => new(value); + } + + /// + /// Discriminated union type for fitH + /// + [Serializable] + public struct FitH + { + public FitH( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitH( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH value + ) => new(value); + } + + /// + /// Discriminated union type for fitV + /// + [Serializable] + public struct FitV + { + public FitV( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitV( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV value + ) => new(value); + } + + /// + /// Discriminated union type for fitR + /// + [Serializable] + public struct FitR + { + public FitR( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitR( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR value + ) => new(value); + } + + /// + /// Discriminated union type for fitB + /// + [Serializable] + public struct FitB + { + public FitB( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitB( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB value + ) => new(value); + } + + /// + /// Discriminated union type for fitBH + /// + [Serializable] + public struct FitBh + { + public FitBh( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitBh( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh value + ) => new(value); + } + + /// + /// Discriminated union type for fitBV + /// + [Serializable] + public struct FitBv + { + public FitBv( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestination.FitBv( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit.cs new file mode 100644 index 0000000..62ab68c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB.cs new file mode 100644 index 0000000..b70b261 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitB + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh.cs new file mode 100644 index 0000000..09f51f8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBh + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("top")] + public double? Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv.cs new file mode 100644 index 0000000..bd38317 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitBv + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("left")] + public double? Left { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH.cs new file mode 100644 index 0000000..7800e84 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitH + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("top")] + public double? Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR.cs new file mode 100644 index 0000000..791c6cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR.cs @@ -0,0 +1,41 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitR + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV.cs new file mode 100644 index 0000000..71718aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationFitV + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("left")] + public double? Left { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz.cs new file mode 100644 index 0000000..7e254ce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoDestinationXyz + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("left")] + public double? Left { get; set; } + + [JsonPropertyName("top")] + public double? Top { get; set; } + + [JsonPropertyName("zoom")] + public double? Zoom { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote.cs new file mode 100644 index 0000000..01b6a20 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetGotoRemote + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("file")] + public required string File { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript.cs new file mode 100644 index 0000000..132e51d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetJavascript + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch.cs new file mode 100644 index 0000000..7580683 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetLaunch + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("path")] + public required string Path { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed.cs new file mode 100644 index 0000000..8b7b4ce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetNamed + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required string Name { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported.cs new file mode 100644 index 0000000..19e0587 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUnsupported + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri.cs new file mode 100644 index 0000000..e7313bb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLinkTargetUri + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("uri")] + public required string Uri { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs new file mode 100644 index 0000000..5b2aa3e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs @@ -0,0 +1,113 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("vertices")] + public IEnumerable Vertices { get; set; } = + new List(); + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("cloudyIntensity")] + public double? CloudyIntensity { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActions.cs new file mode 100644 index 0000000..974afd9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivate.cs new file mode 100644 index 0000000..2477724 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRoot.cs new file mode 100644 index 0000000..86f690a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType.cs new file mode 100644 index 0000000..b389f01 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem.cs new file mode 100644 index 0000000..0c3ef6c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlur.cs new file mode 100644 index 0000000..8573ae6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRoot.cs new file mode 100644 index 0000000..b510a31 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType.cs new file mode 100644 index 0000000..9020393 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem.cs new file mode 100644 index 0000000..4c0d6b1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnter.cs new file mode 100644 index 0000000..9277c36 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRoot.cs new file mode 100644 index 0000000..f7dbe00 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType.cs new file mode 100644 index 0000000..d66f681 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..bbc85c4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExit.cs new file mode 100644 index 0000000..e8cea83 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRoot.cs new file mode 100644 index 0000000..6499f25 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType.cs new file mode 100644 index 0000000..a810f95 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..bdecd8e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocus.cs new file mode 100644 index 0000000..3d16c4c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRoot.cs new file mode 100644 index 0000000..13931de --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType.cs new file mode 100644 index 0000000..fad4986 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem.cs new file mode 100644 index 0000000..a1ac33d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDown.cs new file mode 100644 index 0000000..d656466 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRoot.cs new file mode 100644 index 0000000..0be6510 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType.cs new file mode 100644 index 0000000..a08e362 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..35c7d9d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUp.cs new file mode 100644 index 0000000..c2c29ba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRoot.cs new file mode 100644 index 0000000..732ab3e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType.cs new file mode 100644 index 0000000..b85af98 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..f60f930 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageClose.cs new file mode 100644 index 0000000..e5eb828 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRoot.cs new file mode 100644 index 0000000..1f77fff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType.cs new file mode 100644 index 0000000..a54d19c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..131f59c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisible.cs new file mode 100644 index 0000000..c02cfd5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..efe82e1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..651e7b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..90570fa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpen.cs new file mode 100644 index 0000000..fb15748 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRoot.cs new file mode 100644 index 0000000..194ab93 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType.cs new file mode 100644 index 0000000..dc0a871 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..c1769c0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisible.cs new file mode 100644 index 0000000..4cffbeb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRoot.cs new file mode 100644 index 0000000..6fc0104 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType.cs new file mode 100644 index 0000000..a1688da --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..28def42 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode.cs new file mode 100644 index 0000000..d1c7496 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle.cs new file mode 100644 index 0000000..a766016 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonColor.cs new file mode 100644 index 0000000..116b450 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonFlags.cs new file mode 100644 index 0000000..4fd4b72 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality.cs new file mode 100644 index 0000000..f90c242 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.cs new file mode 100644 index 0000000..ee3f9c9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex.cs new file mode 100644 index 0000000..00fb4ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndexRevision.cs new file mode 100644 index 0000000..9b2a793 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm.cs new file mode 100644 index 0000000..d01bdb6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber.cs new file mode 100644 index 0000000..7c40774 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInteriorColor.cs new file mode 100644 index 0000000..45f1b8a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRect.cs new file mode 100644 index 0000000..7669720 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.cs new file mode 100644 index 0000000..3353055 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.cs @@ -0,0 +1,414 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex.cs new file mode 100644 index 0000000..4c1e982 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndexRevision.cs new file mode 100644 index 0000000..126c8f1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm.cs new file mode 100644 index 0000000..92d40cd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber.cs new file mode 100644 index 0000000..74d9828 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType.cs new file mode 100644 index 0000000..495264d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonVerticesItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonVerticesItem.cs new file mode 100644 index 0000000..dd6412a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonVerticesItem.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonVerticesItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs new file mode 100644 index 0000000..95cfc6f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs @@ -0,0 +1,113 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("vertices")] + public IEnumerable Vertices { get; set; } = + new List(); + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("lineEndings")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndings LineEndings { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActions.cs new file mode 100644 index 0000000..2b295c1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivate.cs new file mode 100644 index 0000000..e0a4f99 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRoot.cs new file mode 100644 index 0000000..3e5fe62 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType.cs new file mode 100644 index 0000000..be1ad73 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem.cs new file mode 100644 index 0000000..f8edba1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlur.cs new file mode 100644 index 0000000..743e576 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRoot.cs new file mode 100644 index 0000000..87ec334 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType.cs new file mode 100644 index 0000000..9f85e23 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem.cs new file mode 100644 index 0000000..d7adffd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnter.cs new file mode 100644 index 0000000..aff128c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRoot.cs new file mode 100644 index 0000000..3d5cf07 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType.cs new file mode 100644 index 0000000..80a2f92 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..d220a89 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExit.cs new file mode 100644 index 0000000..22690a7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRoot.cs new file mode 100644 index 0000000..3fe71df --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType.cs new file mode 100644 index 0000000..f6275a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..b5dba34 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocus.cs new file mode 100644 index 0000000..7af48c5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRoot.cs new file mode 100644 index 0000000..6804171 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType.cs new file mode 100644 index 0000000..c7197fb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem.cs new file mode 100644 index 0000000..4d04452 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDown.cs new file mode 100644 index 0000000..6f394d6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRoot.cs new file mode 100644 index 0000000..f954beb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType.cs new file mode 100644 index 0000000..a5d0f37 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..a8805e0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUp.cs new file mode 100644 index 0000000..09de18e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRoot.cs new file mode 100644 index 0000000..77ef8a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType.cs new file mode 100644 index 0000000..0772231 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..0c1d817 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageClose.cs new file mode 100644 index 0000000..f3d39d8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRoot.cs new file mode 100644 index 0000000..2233ac7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType.cs new file mode 100644 index 0000000..a03db7e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..1e3a33c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisible.cs new file mode 100644 index 0000000..66b6a9c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..c8d08ad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..b084203 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..11e2c32 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpen.cs new file mode 100644 index 0000000..12c4bc3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRoot.cs new file mode 100644 index 0000000..b73b28f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType.cs new file mode 100644 index 0000000..1d2c38b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..35e3a85 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisible.cs new file mode 100644 index 0000000..1a88999 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRoot.cs new file mode 100644 index 0000000..474cded --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType.cs new file mode 100644 index 0000000..1221635 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..a80b33a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode.cs new file mode 100644 index 0000000..a4f02a5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle.cs new file mode 100644 index 0000000..80c5b4d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineColor.cs new file mode 100644 index 0000000..6d4af6d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineFlags.cs new file mode 100644 index 0000000..0b18369 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality.cs new file mode 100644 index 0000000..f75c337 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.cs new file mode 100644 index 0000000..91a1ac2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex.cs new file mode 100644 index 0000000..a578096 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndexRevision.cs new file mode 100644 index 0000000..0ae819d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm.cs new file mode 100644 index 0000000..e7369d3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber.cs new file mode 100644 index 0000000..7003e62 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInteriorColor.cs new file mode 100644 index 0000000..04fb5fe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndings.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndings.cs new file mode 100644 index 0000000..cf0960a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndings.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndings + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("start")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Start { get; set; } + + [JsonPropertyName("end")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd End { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd.cs new file mode 100644 index 0000000..7f9451a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd.cs @@ -0,0 +1,179 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEndSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd None = + new(Values.None); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd Square = + new(Values.Square); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd Circle = + new(Values.Circle); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd Diamond = + new(Values.Diamond); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd OpenArrow = + new(Values.OpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd ClosedArrow = + new(Values.ClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd Butt = + new(Values.Butt); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd ROpenArrow = + new(Values.ROpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd RClosedArrow = + new(Values.RClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd Slash = + new(Values.Slash); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEndSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsEnd value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string None = "none"; + + public const string Square = "square"; + + public const string Circle = "circle"; + + public const string Diamond = "diamond"; + + public const string OpenArrow = "open-arrow"; + + public const string ClosedArrow = "closed-arrow"; + + public const string Butt = "butt"; + + public const string ROpenArrow = "r-open-arrow"; + + public const string RClosedArrow = "r-closed-arrow"; + + public const string Slash = "slash"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart.cs new file mode 100644 index 0000000..54a9b33 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart.cs @@ -0,0 +1,179 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStartSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart None = + new(Values.None); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Square = + new(Values.Square); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Circle = + new(Values.Circle); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Diamond = + new(Values.Diamond); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart OpenArrow = + new(Values.OpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart ClosedArrow = + new(Values.ClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Butt = + new(Values.Butt); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart ROpenArrow = + new(Values.ROpenArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart RClosedArrow = + new(Values.RClosedArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Slash = + new(Values.Slash); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStartSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineLineEndingsStart value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string None = "none"; + + public const string Square = "square"; + + public const string Circle = "circle"; + + public const string Diamond = "diamond"; + + public const string OpenArrow = "open-arrow"; + + public const string ClosedArrow = "closed-arrow"; + + public const string Butt = "butt"; + + public const string ROpenArrow = "r-open-arrow"; + + public const string RClosedArrow = "r-closed-arrow"; + + public const string Slash = "slash"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRect.cs new file mode 100644 index 0000000..b8c463a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.cs new file mode 100644 index 0000000..34e0a3b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.cs @@ -0,0 +1,417 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex.cs new file mode 100644 index 0000000..6a77da5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndexRevision.cs new file mode 100644 index 0000000..ef6bbe8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm.cs new file mode 100644 index 0000000..b74d5c7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber.cs new file mode 100644 index 0000000..520a178 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType.cs new file mode 100644 index 0000000..59954c9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineVerticesItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineVerticesItem.cs new file mode 100644 index 0000000..5f138c4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineVerticesItem.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineVerticesItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact.cs new file mode 100644 index 0000000..92b9374 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact.cs @@ -0,0 +1,116 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedact : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActions? Actions { get; set; } + + [JsonPropertyName("quadPoints")] + public IEnumerable QuadPoints { get; set; } = + new List(); + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("overlayText")] + public string? OverlayText { get; set; } + + [JsonPropertyName("repeat")] + public required bool Repeat { get; set; } + + [JsonPropertyName("fontFamily")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily FontFamily { get; set; } + + [JsonPropertyName("fontSize")] + public required double FontSize { get; set; } + + [JsonPropertyName("fontColor")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontColor FontColor { get; set; } + + [JsonPropertyName("textAlign")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign TextAlign { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActions.cs new file mode 100644 index 0000000..c5352c6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivate.cs new file mode 100644 index 0000000..04531fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRoot.cs new file mode 100644 index 0000000..a581159 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType.cs new file mode 100644 index 0000000..c2a6d1c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem.cs new file mode 100644 index 0000000..75c8384 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlur.cs new file mode 100644 index 0000000..4249afc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRoot.cs new file mode 100644 index 0000000..c08e06c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType.cs new file mode 100644 index 0000000..0d7d844 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem.cs new file mode 100644 index 0000000..a28cb77 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnter.cs new file mode 100644 index 0000000..519e77b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRoot.cs new file mode 100644 index 0000000..308c8f4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType.cs new file mode 100644 index 0000000..0efec84 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..d0f5e08 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExit.cs new file mode 100644 index 0000000..42c288e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRoot.cs new file mode 100644 index 0000000..8ea9531 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType.cs new file mode 100644 index 0000000..72a0dbc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..d2a2a3e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocus.cs new file mode 100644 index 0000000..409f098 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRoot.cs new file mode 100644 index 0000000..ba7daf1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType.cs new file mode 100644 index 0000000..8b24c42 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem.cs new file mode 100644 index 0000000..0662262 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDown.cs new file mode 100644 index 0000000..3126e1c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRoot.cs new file mode 100644 index 0000000..25da31e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType.cs new file mode 100644 index 0000000..26cc4fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..83c016a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUp.cs new file mode 100644 index 0000000..1f673c8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRoot.cs new file mode 100644 index 0000000..342f41b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType.cs new file mode 100644 index 0000000..66a32ef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..682b11f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageClose.cs new file mode 100644 index 0000000..4e729ff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRoot.cs new file mode 100644 index 0000000..0407bd7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType.cs new file mode 100644 index 0000000..7c7e3f4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..4657bad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisible.cs new file mode 100644 index 0000000..239d111 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..b4830a1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..6196832 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..a871938 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpen.cs new file mode 100644 index 0000000..14303c4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRoot.cs new file mode 100644 index 0000000..0899f59 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType.cs new file mode 100644 index 0000000..04af7ad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..023c6ff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisible.cs new file mode 100644 index 0000000..bd8d327 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRoot.cs new file mode 100644 index 0000000..385f0de --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType.cs new file mode 100644 index 0000000..d955ee4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..9c8af55 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode.cs new file mode 100644 index 0000000..60c257b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactColor.cs new file mode 100644 index 0000000..e6e163d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFlags.cs new file mode 100644 index 0000000..25134be --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontColor.cs new file mode 100644 index 0000000..76af3fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily.cs new file mode 100644 index 0000000..984b74f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily.cs @@ -0,0 +1,195 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamilySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily Courier = + new(Values.Courier); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily CourierBold = + new(Values.CourierBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily CourierBoldOblique = + new(Values.CourierBoldOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily CourierOblique = + new(Values.CourierOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily Helvetica = + new(Values.Helvetica); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily HelveticaBold = + new(Values.HelveticaBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily HelveticaBoldOblique = + new(Values.HelveticaBoldOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily HelveticaOblique = + new(Values.HelveticaOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily TimesRoman = + new(Values.TimesRoman); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily TimesBold = + new(Values.TimesBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily TimesBoldItalic = + new(Values.TimesBoldItalic); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily TimesItalic = + new(Values.TimesItalic); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily Symbol = + new(Values.Symbol); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily ZapfDingbats = + new(Values.ZapfDingbats); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamilySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactFontFamily value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Courier = "courier"; + + public const string CourierBold = "courier-bold"; + + public const string CourierBoldOblique = "courier-bold-oblique"; + + public const string CourierOblique = "courier-oblique"; + + public const string Helvetica = "helvetica"; + + public const string HelveticaBold = "helvetica-bold"; + + public const string HelveticaBoldOblique = "helvetica-bold-oblique"; + + public const string HelveticaOblique = "helvetica-oblique"; + + public const string TimesRoman = "times-roman"; + + public const string TimesBold = "times-bold"; + + public const string TimesBoldItalic = "times-bold-italic"; + + public const string TimesItalic = "times-italic"; + + public const string Symbol = "symbol"; + + public const string ZapfDingbats = "zapf-dingbats"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality.cs new file mode 100644 index 0000000..ab20be6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.cs new file mode 100644 index 0000000..ca30586 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex.cs new file mode 100644 index 0000000..26ec97e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndexRevision.cs new file mode 100644 index 0000000..ffe1b01 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm.cs new file mode 100644 index 0000000..6b98d56 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber.cs new file mode 100644 index 0000000..1c296eb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInteriorColor.cs new file mode 100644 index 0000000..711e597 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItem.cs new file mode 100644 index 0000000..b92051e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItem.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("p1")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP1 P1 { get; set; } + + [JsonPropertyName("p2")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP2 P2 { get; set; } + + [JsonPropertyName("p3")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP3 P3 { get; set; } + + [JsonPropertyName("p4")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP4 P4 { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP1.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP1.cs new file mode 100644 index 0000000..0258574 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP1.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP1 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP2.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP2.cs new file mode 100644 index 0000000..e46e0f4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP2.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP2 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP3.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP3.cs new file mode 100644 index 0000000..1645f03 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP3.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP3 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP4.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP4.cs new file mode 100644 index 0000000..e128aa2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP4.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactQuadPointsItemP4 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRect.cs new file mode 100644 index 0000000..62283e5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.cs new file mode 100644 index 0000000..b2468ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.cs @@ -0,0 +1,414 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex.cs new file mode 100644 index 0000000..3b43b36 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndexRevision.cs new file mode 100644 index 0000000..936b45c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm.cs new file mode 100644 index 0000000..eebdb16 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber.cs new file mode 100644 index 0000000..4a4f6c2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType.cs new file mode 100644 index 0000000..9f1e418 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign.cs new file mode 100644 index 0000000..8b2a12a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign.cs @@ -0,0 +1,140 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlignSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign Left = + new(Values.Left); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign Center = + new(Values.Center); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign Right = + new(Values.Right); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlignSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemRedactTextAlign value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Left = "left"; + + public const string Center = "center"; + + public const string Right = "right"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare.cs new file mode 100644 index 0000000..bc07e17 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare.cs @@ -0,0 +1,115 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquare : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("dashArray")] + public IEnumerable? DashArray { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("cloudyIntensity")] + public double? CloudyIntensity { get; set; } + + [JsonPropertyName("rectDifferences")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRectDifferences? RectDifferences { get; set; } + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("unrotatedRect")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareUnrotatedRect? UnrotatedRect { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActions.cs new file mode 100644 index 0000000..e6d9e1f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivate.cs new file mode 100644 index 0000000..6e91fe7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRoot.cs new file mode 100644 index 0000000..dbb4102 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType.cs new file mode 100644 index 0000000..c6d0e43 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem.cs new file mode 100644 index 0000000..41eb45d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlur.cs new file mode 100644 index 0000000..83f157c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRoot.cs new file mode 100644 index 0000000..cf6f343 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType.cs new file mode 100644 index 0000000..28ec26f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem.cs new file mode 100644 index 0000000..f3c0471 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnter.cs new file mode 100644 index 0000000..229857e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRoot.cs new file mode 100644 index 0000000..9a68aa4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType.cs new file mode 100644 index 0000000..cd762fe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..70e8a58 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExit.cs new file mode 100644 index 0000000..4b70657 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRoot.cs new file mode 100644 index 0000000..a914550 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType.cs new file mode 100644 index 0000000..9104a5b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..5d689f0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocus.cs new file mode 100644 index 0000000..333f17d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRoot.cs new file mode 100644 index 0000000..4f83e51 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType.cs new file mode 100644 index 0000000..f9a91c2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem.cs new file mode 100644 index 0000000..d386f85 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDown.cs new file mode 100644 index 0000000..2da6d71 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRoot.cs new file mode 100644 index 0000000..ce7ed85 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType.cs new file mode 100644 index 0000000..e12a9af --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..d7559da --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUp.cs new file mode 100644 index 0000000..350df91 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRoot.cs new file mode 100644 index 0000000..68e71d6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType.cs new file mode 100644 index 0000000..a7644b5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..9dd54e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageClose.cs new file mode 100644 index 0000000..e42afcc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRoot.cs new file mode 100644 index 0000000..e1069b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType.cs new file mode 100644 index 0000000..f59e5a5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..4661f4d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisible.cs new file mode 100644 index 0000000..edb2f8d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..1cb6eb7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..4271641 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..b5b3a57 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpen.cs new file mode 100644 index 0000000..5dfdd74 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRoot.cs new file mode 100644 index 0000000..b5829bb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType.cs new file mode 100644 index 0000000..ac1150b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..803bb14 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisible.cs new file mode 100644 index 0000000..a6ce241 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRoot.cs new file mode 100644 index 0000000..d02b378 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType.cs new file mode 100644 index 0000000..7333234 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..753775b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode.cs new file mode 100644 index 0000000..57b86cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle.cs new file mode 100644 index 0000000..b56956d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareColor.cs new file mode 100644 index 0000000..55be355 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareFlags.cs new file mode 100644 index 0000000..d034793 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality.cs new file mode 100644 index 0000000..a1ca7b4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.cs new file mode 100644 index 0000000..333eccc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex.cs new file mode 100644 index 0000000..8fe513b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndexRevision.cs new file mode 100644 index 0000000..391a90a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm.cs new file mode 100644 index 0000000..1f436c1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber.cs new file mode 100644 index 0000000..cf5be99 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInteriorColor.cs new file mode 100644 index 0000000..7d75a49 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRect.cs new file mode 100644 index 0000000..bd13d61 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRectDifferences.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRectDifferences.cs new file mode 100644 index 0000000..934ce6b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRectDifferences.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRectDifferences + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.cs new file mode 100644 index 0000000..0f40998 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.cs @@ -0,0 +1,414 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex.cs new file mode 100644 index 0000000..ce8f015 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndexRevision.cs new file mode 100644 index 0000000..319bb6c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm.cs new file mode 100644 index 0000000..49d0041 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber.cs new file mode 100644 index 0000000..495e04a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType.cs new file mode 100644 index 0000000..57a1441 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareUnrotatedRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareUnrotatedRect.cs new file mode 100644 index 0000000..5ff4ee0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareUnrotatedRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquareUnrotatedRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly.cs new file mode 100644 index 0000000..2294487 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly.cs @@ -0,0 +1,95 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquiggly : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("quadPoints")] + public IEnumerable QuadPoints { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActions.cs new file mode 100644 index 0000000..f81e489 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivate.cs new file mode 100644 index 0000000..7bec02d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRoot.cs new file mode 100644 index 0000000..a6b7e2a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType.cs new file mode 100644 index 0000000..d60b3de --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem.cs new file mode 100644 index 0000000..76a3feb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlur.cs new file mode 100644 index 0000000..6f5cc0c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRoot.cs new file mode 100644 index 0000000..2f2bac6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType.cs new file mode 100644 index 0000000..9cb8cef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem.cs new file mode 100644 index 0000000..38214d1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnter.cs new file mode 100644 index 0000000..fd4cba1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRoot.cs new file mode 100644 index 0000000..088b897 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType.cs new file mode 100644 index 0000000..986abfd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..88651e7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExit.cs new file mode 100644 index 0000000..4900b78 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRoot.cs new file mode 100644 index 0000000..e70d20d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType.cs new file mode 100644 index 0000000..4b11ac3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..7aa2ecd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocus.cs new file mode 100644 index 0000000..3077405 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRoot.cs new file mode 100644 index 0000000..8498610 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType.cs new file mode 100644 index 0000000..2f564b9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem.cs new file mode 100644 index 0000000..5e9a84e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDown.cs new file mode 100644 index 0000000..bfd1136 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRoot.cs new file mode 100644 index 0000000..3b267bd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType.cs new file mode 100644 index 0000000..7f9d782 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..83d1cff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUp.cs new file mode 100644 index 0000000..ea7f313 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRoot.cs new file mode 100644 index 0000000..1c046d4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType.cs new file mode 100644 index 0000000..12f3c60 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..fb321e7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageClose.cs new file mode 100644 index 0000000..5172fd6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRoot.cs new file mode 100644 index 0000000..75f7403 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType.cs new file mode 100644 index 0000000..dc2565d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..890d6b0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisible.cs new file mode 100644 index 0000000..84993a0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..5e4c939 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..5e7b26b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..291e746 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpen.cs new file mode 100644 index 0000000..2e51ee5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRoot.cs new file mode 100644 index 0000000..dcd9e52 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType.cs new file mode 100644 index 0000000..4f80e70 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..f21c672 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisible.cs new file mode 100644 index 0000000..21afe5f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRoot.cs new file mode 100644 index 0000000..05ab1a5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType.cs new file mode 100644 index 0000000..ee0ad9e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..6f948cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode.cs new file mode 100644 index 0000000..dde018f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyColor.cs new file mode 100644 index 0000000..82cf0e5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyFlags.cs new file mode 100644 index 0000000..d5b5455 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality.cs new file mode 100644 index 0000000..8f4b16a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.cs new file mode 100644 index 0000000..3b0faa7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex.cs new file mode 100644 index 0000000..7dfda7d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndexRevision.cs new file mode 100644 index 0000000..6c5e95b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm.cs new file mode 100644 index 0000000..720893e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber.cs new file mode 100644 index 0000000..f8d7326 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItem.cs new file mode 100644 index 0000000..f7317a2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItem.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("p1")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP1 P1 { get; set; } + + [JsonPropertyName("p2")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP2 P2 { get; set; } + + [JsonPropertyName("p3")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP3 P3 { get; set; } + + [JsonPropertyName("p4")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP4 P4 { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP1.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP1.cs new file mode 100644 index 0000000..15f0ee6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP1.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP1 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP2.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP2.cs new file mode 100644 index 0000000..0248ee1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP2.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP2 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP3.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP3.cs new file mode 100644 index 0000000..3de9bd4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP3.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP3 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP4.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP4.cs new file mode 100644 index 0000000..2745d96 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP4.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyQuadPointsItemP4 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRect.cs new file mode 100644 index 0000000..799c21b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.cs new file mode 100644 index 0000000..63698dd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.cs @@ -0,0 +1,417 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex.cs new file mode 100644 index 0000000..33e1156 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndexRevision.cs new file mode 100644 index 0000000..285d3dd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm.cs new file mode 100644 index 0000000..941acfc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber.cs new file mode 100644 index 0000000..77ed341 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType.cs new file mode 100644 index 0000000..61645f1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemSquigglyReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp.cs new file mode 100644 index 0000000..8dbe24a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp.cs @@ -0,0 +1,94 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStamp : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActions? Actions { get; set; } + + [JsonPropertyName("name")] + public string? Name { get; set; } + + [JsonPropertyName("rotation")] + public double? Rotation { get; set; } + + [JsonPropertyName("unrotatedRect")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampUnrotatedRect? UnrotatedRect { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActions.cs new file mode 100644 index 0000000..fda79e8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivate.cs new file mode 100644 index 0000000..f320b6d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRoot.cs new file mode 100644 index 0000000..df72494 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType.cs new file mode 100644 index 0000000..24c74b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem.cs new file mode 100644 index 0000000..e7311aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlur.cs new file mode 100644 index 0000000..e140257 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRoot.cs new file mode 100644 index 0000000..a37fd64 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType.cs new file mode 100644 index 0000000..33aa22d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem.cs new file mode 100644 index 0000000..d6e93fa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnter.cs new file mode 100644 index 0000000..9d29484 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRoot.cs new file mode 100644 index 0000000..80863ef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType.cs new file mode 100644 index 0000000..b040582 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..4dcd30b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExit.cs new file mode 100644 index 0000000..a8728a9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRoot.cs new file mode 100644 index 0000000..744ad61 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType.cs new file mode 100644 index 0000000..7a1ae44 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..ca069e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocus.cs new file mode 100644 index 0000000..209f8fe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRoot.cs new file mode 100644 index 0000000..5b21945 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType.cs new file mode 100644 index 0000000..be7c3da --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem.cs new file mode 100644 index 0000000..8999524 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDown.cs new file mode 100644 index 0000000..fbdc4e4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRoot.cs new file mode 100644 index 0000000..17dd1aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType.cs new file mode 100644 index 0000000..22f5b6d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..176897a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUp.cs new file mode 100644 index 0000000..dfacd0b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRoot.cs new file mode 100644 index 0000000..7f5bc48 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType.cs new file mode 100644 index 0000000..daf32e5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..e60ac6e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageClose.cs new file mode 100644 index 0000000..9a4df4b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRoot.cs new file mode 100644 index 0000000..b62047e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType.cs new file mode 100644 index 0000000..9a71f04 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..19c16c4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisible.cs new file mode 100644 index 0000000..5913325 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..0169b7c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..068922c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..6d76ef1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpen.cs new file mode 100644 index 0000000..92abbbe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRoot.cs new file mode 100644 index 0000000..f85635e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType.cs new file mode 100644 index 0000000..f74539a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..78df567 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisible.cs new file mode 100644 index 0000000..e8566fd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRoot.cs new file mode 100644 index 0000000..7da1912 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType.cs new file mode 100644 index 0000000..a7eb3ad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..6e275f1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode.cs new file mode 100644 index 0000000..078ed40 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampFlags.cs new file mode 100644 index 0000000..217c262 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality.cs new file mode 100644 index 0000000..9a1972b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.cs new file mode 100644 index 0000000..6dabbf4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex.cs new file mode 100644 index 0000000..2d39ea3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndexRevision.cs new file mode 100644 index 0000000..d75beee --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm.cs new file mode 100644 index 0000000..8da3870 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber.cs new file mode 100644 index 0000000..b6a16fa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRect.cs new file mode 100644 index 0000000..aaaa261 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.cs new file mode 100644 index 0000000..cbad2dd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.cs @@ -0,0 +1,410 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex? value + ) + { + if (Kind == "index") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex.cs new file mode 100644 index 0000000..a320ae4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndexRevision.cs new file mode 100644 index 0000000..9116ca4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm.cs new file mode 100644 index 0000000..4478fb4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber.cs new file mode 100644 index 0000000..6c65098 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType.cs new file mode 100644 index 0000000..e406d63 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampUnrotatedRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampUnrotatedRect.cs new file mode 100644 index 0000000..f248e0f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampUnrotatedRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStampUnrotatedRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout.cs new file mode 100644 index 0000000..fad714f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout.cs @@ -0,0 +1,99 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeout + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("quadPoints")] + public IEnumerable QuadPoints { get; set; } = + new List(); + + [JsonPropertyName("intent")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent? Intent { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActions.cs new file mode 100644 index 0000000..7488928 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivate.cs new file mode 100644 index 0000000..56fe80d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRoot.cs new file mode 100644 index 0000000..518fddc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType.cs new file mode 100644 index 0000000..c9c3668 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem.cs new file mode 100644 index 0000000..96cf60d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlur.cs new file mode 100644 index 0000000..ac4c6b5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRoot.cs new file mode 100644 index 0000000..3626037 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType.cs new file mode 100644 index 0000000..0c3afb1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem.cs new file mode 100644 index 0000000..b398abd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnter.cs new file mode 100644 index 0000000..6f2b79b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRoot.cs new file mode 100644 index 0000000..c83ed13 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType.cs new file mode 100644 index 0000000..3c5a2b6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..2a8f9cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExit.cs new file mode 100644 index 0000000..2df997a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRoot.cs new file mode 100644 index 0000000..5f372c4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType.cs new file mode 100644 index 0000000..9c5ea2e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..82f6e10 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocus.cs new file mode 100644 index 0000000..46b39db --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRoot.cs new file mode 100644 index 0000000..db79bfd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType.cs new file mode 100644 index 0000000..41be52b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem.cs new file mode 100644 index 0000000..1ea462c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDown.cs new file mode 100644 index 0000000..dbbf61e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRoot.cs new file mode 100644 index 0000000..7050de4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType.cs new file mode 100644 index 0000000..34ee7d4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..ca24a9e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUp.cs new file mode 100644 index 0000000..6346c49 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRoot.cs new file mode 100644 index 0000000..de10f22 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType.cs new file mode 100644 index 0000000..7675b1b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..9eba007 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageClose.cs new file mode 100644 index 0000000..6c7d116 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRoot.cs new file mode 100644 index 0000000..c47be05 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType.cs new file mode 100644 index 0000000..a5ebbc2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..6c57fd4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisible.cs new file mode 100644 index 0000000..19b68d8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..750b8be --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..ee753cc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..27bef76 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpen.cs new file mode 100644 index 0000000..af80166 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRoot.cs new file mode 100644 index 0000000..614ef13 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType.cs new file mode 100644 index 0000000..86b9172 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..e97a29b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisible.cs new file mode 100644 index 0000000..e109523 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRoot.cs new file mode 100644 index 0000000..7958b7b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType.cs new file mode 100644 index 0000000..8693210 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..3c85304 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode.cs new file mode 100644 index 0000000..0ccd7f8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode.cs @@ -0,0 +1,207 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutColor.cs new file mode 100644 index 0000000..c57a209 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutFlags.cs new file mode 100644 index 0000000..e9d1b03 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality.cs new file mode 100644 index 0000000..b9bcd06 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.cs new file mode 100644 index 0000000..9acbf48 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex.cs new file mode 100644 index 0000000..e14d84a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndexRevision.cs new file mode 100644 index 0000000..d6f34a6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm.cs new file mode 100644 index 0000000..5c11baa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber.cs new file mode 100644 index 0000000..237bde4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent.cs new file mode 100644 index 0000000..2bbc4e0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent StrikeoutTextEdit = + new(Values.StrikeoutTextEdit); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string StrikeoutTextEdit = "strikeout-text-edit"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItem.cs new file mode 100644 index 0000000..b2f0f64 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItem.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("p1")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP1 P1 { get; set; } + + [JsonPropertyName("p2")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP2 P2 { get; set; } + + [JsonPropertyName("p3")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP3 P3 { get; set; } + + [JsonPropertyName("p4")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP4 P4 { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP1.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP1.cs new file mode 100644 index 0000000..fb7e7ef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP1.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP1 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP2.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP2.cs new file mode 100644 index 0000000..e3bd0f9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP2.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP2 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP3.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP3.cs new file mode 100644 index 0000000..434b154 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP3.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP3 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP4.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP4.cs new file mode 100644 index 0000000..2434093 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP4.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutQuadPointsItemP4 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRect.cs new file mode 100644 index 0000000..f0dea79 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.cs new file mode 100644 index 0000000..bd781c0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex.cs new file mode 100644 index 0000000..b1f9dea --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndexRevision.cs new file mode 100644 index 0000000..c824d6f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm.cs new file mode 100644 index 0000000..abf323f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber.cs new file mode 100644 index 0000000..74945b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType.cs new file mode 100644 index 0000000..df52af6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemStrikeoutReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText.cs new file mode 100644 index 0000000..6d57491 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText.cs @@ -0,0 +1,100 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemText : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("icon")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Icon { get; set; } + + [JsonPropertyName("state")] + public string? State { get; set; } + + [JsonPropertyName("stateModel")] + public string? StateModel { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActions.cs new file mode 100644 index 0000000..cebba10 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivate.cs new file mode 100644 index 0000000..14f64a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRoot.cs new file mode 100644 index 0000000..b1410e5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType.cs new file mode 100644 index 0000000..b517038 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem.cs new file mode 100644 index 0000000..9a623e6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlur.cs new file mode 100644 index 0000000..90b386f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRoot.cs new file mode 100644 index 0000000..d468169 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType.cs new file mode 100644 index 0000000..ed2e4b6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem.cs new file mode 100644 index 0000000..a526296 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnter.cs new file mode 100644 index 0000000..049dc71 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRoot.cs new file mode 100644 index 0000000..6bab9d2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType.cs new file mode 100644 index 0000000..56b27b5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..64684c3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExit.cs new file mode 100644 index 0000000..3df721e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRoot.cs new file mode 100644 index 0000000..01a7813 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType.cs new file mode 100644 index 0000000..6b0541d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..aa7b069 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocus.cs new file mode 100644 index 0000000..0065c99 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRoot.cs new file mode 100644 index 0000000..2357eef --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType.cs new file mode 100644 index 0000000..2f7d7a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem.cs new file mode 100644 index 0000000..565369a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDown.cs new file mode 100644 index 0000000..66b9ba8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRoot.cs new file mode 100644 index 0000000..58fa05b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType.cs new file mode 100644 index 0000000..968d97f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..31de18d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUp.cs new file mode 100644 index 0000000..c6caebe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRoot.cs new file mode 100644 index 0000000..f5219ba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType.cs new file mode 100644 index 0000000..50f856c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..fe0f5d1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageClose.cs new file mode 100644 index 0000000..587204d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRoot.cs new file mode 100644 index 0000000..7d63a43 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType.cs new file mode 100644 index 0000000..a41e6cc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..0fbbd54 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisible.cs new file mode 100644 index 0000000..ee81a94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..8b68089 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..4faafc8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..09caebc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpen.cs new file mode 100644 index 0000000..f709df6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRoot.cs new file mode 100644 index 0000000..0d01126 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType.cs new file mode 100644 index 0000000..aa1e006 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..0764625 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisible.cs new file mode 100644 index 0000000..54bdf7a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRoot.cs new file mode 100644 index 0000000..ef3a966 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType.cs new file mode 100644 index 0000000..27de3a7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..76391ea --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode.cs new file mode 100644 index 0000000..19b3a84 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextColor.cs new file mode 100644 index 0000000..44d8a5a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextFlags.cs new file mode 100644 index 0000000..eb686aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon.cs new file mode 100644 index 0000000..a205360 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon.cs @@ -0,0 +1,160 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIconSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Comment = + new(Values.Comment); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Key = + new(Values.Key); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Note = + new(Values.Note); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Help = + new(Values.Help); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon NewParagraph = + new(Values.NewParagraph); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Paragraph = + new(Values.Paragraph); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Insert = + new(Values.Insert); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIconSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIcon value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Comment = "comment"; + + public const string Key = "key"; + + public const string Note = "note"; + + public const string Help = "help"; + + public const string NewParagraph = "new-paragraph"; + + public const string Paragraph = "paragraph"; + + public const string Insert = "insert"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality.cs new file mode 100644 index 0000000..190c42d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.cs new file mode 100644 index 0000000..1f91bbb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex.cs new file mode 100644 index 0000000..28b47b6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndexRevision.cs new file mode 100644 index 0000000..10bc3cb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm.cs new file mode 100644 index 0000000..40cb55a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber.cs new file mode 100644 index 0000000..7560330 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRect.cs new file mode 100644 index 0000000..e010ead --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRect.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRect : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.cs new file mode 100644 index 0000000..2182809 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.cs @@ -0,0 +1,410 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex? value + ) + { + if (Kind == "index") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm(CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex.cs new file mode 100644 index 0000000..61f664a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndexRevision.cs new file mode 100644 index 0000000..cadc1c0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm.cs new file mode 100644 index 0000000..9e41990 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber.cs new file mode 100644 index 0000000..9062f20 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType.cs new file mode 100644 index 0000000..46e109f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemTextReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline.cs new file mode 100644 index 0000000..379a3a3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline.cs @@ -0,0 +1,96 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderline + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActions? Actions { get; set; } + + [JsonPropertyName("color")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineColor Color { get; set; } + + [JsonPropertyName("opacity")] + public required double Opacity { get; set; } + + [JsonPropertyName("quadPoints")] + public IEnumerable QuadPoints { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActions.cs new file mode 100644 index 0000000..139afdf --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivate.cs new file mode 100644 index 0000000..add2496 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRoot.cs new file mode 100644 index 0000000..df10307 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType.cs new file mode 100644 index 0000000..4e6bbb5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem.cs new file mode 100644 index 0000000..a5771c2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlur.cs new file mode 100644 index 0000000..818d2d4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRoot.cs new file mode 100644 index 0000000..e8e78aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType.cs new file mode 100644 index 0000000..8195275 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem.cs new file mode 100644 index 0000000..92c02ab --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnter.cs new file mode 100644 index 0000000..b7b3ada --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRoot.cs new file mode 100644 index 0000000..1b532b6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType.cs new file mode 100644 index 0000000..1538471 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..f898408 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExit.cs new file mode 100644 index 0000000..aed75f3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRoot.cs new file mode 100644 index 0000000..e510e58 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType.cs new file mode 100644 index 0000000..bf8604a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..985d150 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocus.cs new file mode 100644 index 0000000..d9c9d2f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRoot.cs new file mode 100644 index 0000000..93bb2b1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType.cs new file mode 100644 index 0000000..711af3a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem.cs new file mode 100644 index 0000000..af4b342 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDown.cs new file mode 100644 index 0000000..f5172fe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRoot.cs new file mode 100644 index 0000000..23e536f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType.cs new file mode 100644 index 0000000..c16f19a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..8af30b7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUp.cs new file mode 100644 index 0000000..931d795 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRoot.cs new file mode 100644 index 0000000..3a6e69c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType.cs new file mode 100644 index 0000000..2233efb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..d108be1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageClose.cs new file mode 100644 index 0000000..45de40e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRoot.cs new file mode 100644 index 0000000..0bd4e3b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType.cs new file mode 100644 index 0000000..59d0a44 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..cb84abb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisible.cs new file mode 100644 index 0000000..663ac6e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..d1dc486 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..b50d963 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..28fcac2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpen.cs new file mode 100644 index 0000000..a78e76a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRoot.cs new file mode 100644 index 0000000..c9706e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType.cs new file mode 100644 index 0000000..715923d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..8896985 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisible.cs new file mode 100644 index 0000000..eae7d93 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRoot.cs new file mode 100644 index 0000000..6d5d4fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType.cs new file mode 100644 index 0000000..c8ec6ce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..39fbec4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode.cs new file mode 100644 index 0000000..a13cb91 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode.cs @@ -0,0 +1,207 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineColor.cs new file mode 100644 index 0000000..1c476a0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineFlags.cs new file mode 100644 index 0000000..1af715b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality.cs new file mode 100644 index 0000000..794fd02 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.cs new file mode 100644 index 0000000..ca7f5a1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex.cs new file mode 100644 index 0000000..f0ea8a4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndexRevision.cs new file mode 100644 index 0000000..be35bf4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm.cs new file mode 100644 index 0000000..36805f9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber.cs new file mode 100644 index 0000000..b25ade4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItem.cs new file mode 100644 index 0000000..7632488 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItem.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("p1")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP1 P1 { get; set; } + + [JsonPropertyName("p2")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP2 P2 { get; set; } + + [JsonPropertyName("p3")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP3 P3 { get; set; } + + [JsonPropertyName("p4")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP4 P4 { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP1.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP1.cs new file mode 100644 index 0000000..92ea346 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP1.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP1 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP2.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP2.cs new file mode 100644 index 0000000..20b073e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP2.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP2 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP3.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP3.cs new file mode 100644 index 0000000..b6fa277 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP3.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP3 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP4.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP4.cs new file mode 100644 index 0000000..13030f8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP4.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineQuadPointsItemP4 + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("x")] + public required double X { get; set; } + + [JsonPropertyName("y")] + public required double Y { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRect.cs new file mode 100644 index 0000000..00c7ac2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.cs new file mode 100644 index 0000000..1956b86 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex.cs new file mode 100644 index 0000000..e7e2b4a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndexRevision.cs new file mode 100644 index 0000000..cf6b7b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm.cs new file mode 100644 index 0000000..06284ea --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber.cs new file mode 100644 index 0000000..72e9dc7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType.cs new file mode 100644 index 0000000..2aad673 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnderlineReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported.cs new file mode 100644 index 0000000..62abf6b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported.cs @@ -0,0 +1,92 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupported + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActions? Actions { get; set; } + + [JsonPropertyName("rawSubtypeCode")] + public required int RawSubtypeCode { get; set; } + + [JsonPropertyName("rawSubtypeName")] + public string? RawSubtypeName { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActions.cs new file mode 100644 index 0000000..cd86515 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivate.cs new file mode 100644 index 0000000..2afe3b0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRoot.cs new file mode 100644 index 0000000..546bec3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType.cs new file mode 100644 index 0000000..08518fd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem.cs new file mode 100644 index 0000000..a52c3dc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlur.cs new file mode 100644 index 0000000..ca0c583 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRoot.cs new file mode 100644 index 0000000..0098ed7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType.cs new file mode 100644 index 0000000..afaa073 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem.cs new file mode 100644 index 0000000..ce56cbe --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnter.cs new file mode 100644 index 0000000..5e6c58c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRoot.cs new file mode 100644 index 0000000..0a52421 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType.cs new file mode 100644 index 0000000..cec4f17 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..5417f70 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExit.cs new file mode 100644 index 0000000..61087b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRoot.cs new file mode 100644 index 0000000..8bb41d9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType.cs new file mode 100644 index 0000000..3d30c90 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..caad664 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocus.cs new file mode 100644 index 0000000..c4d381d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRoot.cs new file mode 100644 index 0000000..a81d50a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType.cs new file mode 100644 index 0000000..b5e201e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem.cs new file mode 100644 index 0000000..d95e9c6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDown.cs new file mode 100644 index 0000000..5a63f32 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRoot.cs new file mode 100644 index 0000000..123bdc1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType.cs new file mode 100644 index 0000000..25be178 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..be86dcb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUp.cs new file mode 100644 index 0000000..65bb706 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRoot.cs new file mode 100644 index 0000000..faba384 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType.cs new file mode 100644 index 0000000..52a298a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..0be392f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageClose.cs new file mode 100644 index 0000000..9340316 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRoot.cs new file mode 100644 index 0000000..22dcbf0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType.cs new file mode 100644 index 0000000..8b5500b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..746e5d5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisible.cs new file mode 100644 index 0000000..b409664 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..a16ffe7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..a4ad9ab --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..27d55d5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpen.cs new file mode 100644 index 0000000..a2a1909 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRoot.cs new file mode 100644 index 0000000..5d30861 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType.cs new file mode 100644 index 0000000..6f04729 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..4d86817 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisible.cs new file mode 100644 index 0000000..0e0f508 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRoot.cs new file mode 100644 index 0000000..9da6dc2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType.cs new file mode 100644 index 0000000..5c38dc9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..bc7fc89 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode.cs new file mode 100644 index 0000000..7cd7a28 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode.cs @@ -0,0 +1,209 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedFlags.cs new file mode 100644 index 0000000..06cb6e4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality.cs new file mode 100644 index 0000000..54c6ee3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.cs new file mode 100644 index 0000000..8de8115 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex.cs new file mode 100644 index 0000000..ccae133 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndexRevision.cs new file mode 100644 index 0000000..0a15fb8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm.cs new file mode 100644 index 0000000..c4f7a78 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber.cs new file mode 100644 index 0000000..3cc0277 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRect.cs new file mode 100644 index 0000000..62840ba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.cs new file mode 100644 index 0000000..db0f2db --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex.cs new file mode 100644 index 0000000..992e900 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndexRevision.cs new file mode 100644 index 0000000..d6eaa9e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm.cs new file mode 100644 index 0000000..7ef5fcd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber.cs new file mode 100644 index 0000000..6411803 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType.cs new file mode 100644 index 0000000..445356e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemUnsupportedReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget.cs new file mode 100644 index 0000000..dfe1b5e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget.cs @@ -0,0 +1,115 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidget : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ref")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef Ref { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("identityQuality")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality IdentityQuality { get; set; } + + [JsonPropertyName("nm")] + public string? Nm { get; set; } + + [JsonPropertyName("flags")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFlags Flags { get; set; } + + [JsonPropertyName("rect")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRect Rect { get; set; } + + [JsonPropertyName("contents")] + public string? Contents { get; set; } + + [JsonPropertyName("subject")] + public string? Subject { get; set; } + + [JsonPropertyName("author")] + public string? Author { get; set; } + + [JsonPropertyName("created")] + public DateTime? Created { get; set; } + + [JsonPropertyName("modified")] + public DateTime? Modified { get; set; } + + [JsonPropertyName("blendMode")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode BlendMode { get; set; } + + [JsonPropertyName("inReplyTo")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo? InReplyTo { get; set; } + + [JsonPropertyName("replyType")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType? ReplyType { get; set; } + + [JsonPropertyName("userId")] + public string? UserId { get; set; } + + [JsonPropertyName("groupId")] + public string? GroupId { get; set; } + + [JsonPropertyName("createdBy")] + public string? CreatedBy { get; set; } + + [JsonPropertyName("updatedBy")] + public string? UpdatedBy { get; set; } + + [JsonPropertyName("actions")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActions? Actions { get; set; } + + [JsonPropertyName("color")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetColor? Color { get; set; } + + [JsonPropertyName("interiorColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInteriorColor? InteriorColor { get; set; } + + [JsonPropertyName("strokeWidth")] + public required double StrokeWidth { get; set; } + + [JsonPropertyName("borderStyle")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle BorderStyle { get; set; } + + [JsonPropertyName("fontFamily")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily? FontFamily { get; set; } + + [JsonPropertyName("fontSize")] + public double? FontSize { get; set; } + + [JsonPropertyName("fontColor")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontColor? FontColor { get; set; } + + [JsonPropertyName("textAlign")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign TextAlign { get; set; } + + [JsonPropertyName("fieldObjectNumber")] + public required int FieldObjectNumber { get; set; } + + [JsonPropertyName("fieldFamily")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily FieldFamily { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActions.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActions.cs new file mode 100644 index 0000000..54aaa0f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActions.cs @@ -0,0 +1,59 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActions + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("activate")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivate? Activate { get; set; } + + [JsonPropertyName("cursorEnter")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnter? CursorEnter { get; set; } + + [JsonPropertyName("cursorExit")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExit? CursorExit { get; set; } + + [JsonPropertyName("mouseDown")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDown? MouseDown { get; set; } + + [JsonPropertyName("mouseUp")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUp? MouseUp { get; set; } + + [JsonPropertyName("focus")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocus? Focus { get; set; } + + [JsonPropertyName("blur")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlur? Blur { get; set; } + + [JsonPropertyName("pageOpen")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpen? PageOpen { get; set; } + + [JsonPropertyName("pageClose")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageClose? PageClose { get; set; } + + [JsonPropertyName("pageVisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisible? PageVisible { get; set; } + + [JsonPropertyName("pageInvisible")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisible? PageInvisible { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivate.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivate.cs new file mode 100644 index 0000000..f8256f1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivate.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivate + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRoot.cs new file mode 100644 index 0000000..ff70e51 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType.cs new file mode 100644 index 0000000..954dab7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem.cs new file mode 100644 index 0000000..450fa4c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsActivateWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlur.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlur.cs new file mode 100644 index 0000000..3d193e0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlur.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlur + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRoot.cs new file mode 100644 index 0000000..b486462 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType.cs new file mode 100644 index 0000000..5216d15 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem.cs new file mode 100644 index 0000000..7bf1e97 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsBlurWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnter.cs new file mode 100644 index 0000000..860b842 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnter.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnter + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRoot.cs new file mode 100644 index 0000000..d36e1db --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType.cs new file mode 100644 index 0000000..2f16d86 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem.cs new file mode 100644 index 0000000..ef827df --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorEnterWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExit.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExit.cs new file mode 100644 index 0000000..d1fade0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExit.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExit + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRoot.cs new file mode 100644 index 0000000..9ef40ce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType.cs new file mode 100644 index 0000000..fc12a9d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem.cs new file mode 100644 index 0000000..4ecf023 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsCursorExitWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocus.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocus.cs new file mode 100644 index 0000000..b83d5a9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocus.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocus + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRoot.cs new file mode 100644 index 0000000..41077ec --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType.cs new file mode 100644 index 0000000..74b4962 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem.cs new file mode 100644 index 0000000..a712a9e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsFocusWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDown.cs new file mode 100644 index 0000000..b8c9bc0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDown.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRoot.cs new file mode 100644 index 0000000..c1b825e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType.cs new file mode 100644 index 0000000..d60db33 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem.cs new file mode 100644 index 0000000..7d448e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseDownWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUp.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUp.cs new file mode 100644 index 0000000..5da593b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUp.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUp + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRoot.cs new file mode 100644 index 0000000..b09754d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType.cs new file mode 100644 index 0000000..cba67ff --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem.cs new file mode 100644 index 0000000..43053ae --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsMouseUpWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageClose.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageClose.cs new file mode 100644 index 0000000..9de5422 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageClose.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageClose + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRoot.cs new file mode 100644 index 0000000..f6110dd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType.cs new file mode 100644 index 0000000..cc2a481 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem.cs new file mode 100644 index 0000000..99632ce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageCloseWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisible.cs new file mode 100644 index 0000000..d82bce1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRoot.cs new file mode 100644 index 0000000..a65a0ae --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType.cs new file mode 100644 index 0000000..9754953 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem.cs new file mode 100644 index 0000000..61c4788 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageInvisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpen.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpen.cs new file mode 100644 index 0000000..0c2c297 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpen.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpen + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRoot.cs new file mode 100644 index 0000000..4445c36 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType.cs new file mode 100644 index 0000000..d037fbb --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem.cs new file mode 100644 index 0000000..1406571 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageOpenWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisible.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisible.cs new file mode 100644 index 0000000..1daa748 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisible.cs @@ -0,0 +1,39 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisible + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("root")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRoot? Root { get; set; } + + [JsonPropertyName("incomplete")] + public required bool Incomplete { get; set; } + + [JsonPropertyName("warningFlags")] + public required int WarningFlags { get; set; } + + [JsonPropertyName("warnings")] + public IEnumerable Warnings { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRoot.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRoot.cs new file mode 100644 index 0000000..0c851dd --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRoot.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRoot + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("type")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Type { get; set; } + + [JsonPropertyName("subtype")] + public required string Subtype { get; set; } + + [JsonPropertyName("script")] + public string? Script { get; set; } + + [JsonPropertyName("next")] + public IEnumerable Next { get; set; } = new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType.cs new file mode 100644 index 0000000..46aaae8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType.cs @@ -0,0 +1,224 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Unknown = + new(Values.Unknown); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Goto = + new(Values.Goto); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType GotoRemote = + new(Values.GotoRemote); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType GotoEmbedded = + new(Values.GotoEmbedded); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Launch = + new(Values.Launch); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Thread = + new(Values.Thread); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Uri = + new(Values.Uri); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Sound = + new(Values.Sound); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Movie = + new(Values.Movie); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Hide = + new(Values.Hide); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Named = + new(Values.Named); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType SubmitForm = + new(Values.SubmitForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType ResetForm = + new(Values.ResetForm); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType ImportData = + new(Values.ImportData); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Javascript = + new(Values.Javascript); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType SetOcgState = + new(Values.SetOcgState); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Rendition = + new(Values.Rendition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Transition = + new(Values.Transition); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Goto3DView = + new(Values.Goto3DView); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleRootType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "unknown"; + + public const string Goto = "goto"; + + public const string GotoRemote = "goto-remote"; + + public const string GotoEmbedded = "goto-embedded"; + + public const string Launch = "launch"; + + public const string Thread = "thread"; + + public const string Uri = "uri"; + + public const string Sound = "sound"; + + public const string Movie = "movie"; + + public const string Hide = "hide"; + + public const string Named = "named"; + + public const string SubmitForm = "submit-form"; + + public const string ResetForm = "reset-form"; + + public const string ImportData = "import-data"; + + public const string Javascript = "javascript"; + + public const string SetOcgState = "set-ocg-state"; + + public const string Rendition = "rendition"; + + public const string Transition = "transition"; + + public const string Goto3DView = "goto-3d-view"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem.cs new file mode 100644 index 0000000..c261e99 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem.cs @@ -0,0 +1,144 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItemSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem CycleDropped = + new(Values.CycleDropped); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem MalformedNext = + new(Values.MalformedNext); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem Incomplete = + new(Values.Incomplete); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItemSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetActionsPageVisibleWarningsItem value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string CycleDropped = "cycle-dropped"; + + public const string MalformedNext = "malformed-next"; + + public const string Incomplete = "incomplete"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode.cs new file mode 100644 index 0000000..421b5e6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode.cs @@ -0,0 +1,205 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendModeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Normal = + new(Values.Normal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Multiply = + new(Values.Multiply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Screen = + new(Values.Screen); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Overlay = + new(Values.Overlay); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Darken = + new(Values.Darken); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Lighten = + new(Values.Lighten); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode ColorDodge = + new(Values.ColorDodge); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode ColorBurn = + new(Values.ColorBurn); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode HardLight = + new(Values.HardLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode SoftLight = + new(Values.SoftLight); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Difference = + new(Values.Difference); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Exclusion = + new(Values.Exclusion); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Hue = + new(Values.Hue); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Saturation = + new(Values.Saturation); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Color = + new(Values.Color); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Luminosity = + new(Values.Luminosity); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendModeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBlendMode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Normal = "normal"; + + public const string Multiply = "multiply"; + + public const string Screen = "screen"; + + public const string Overlay = "overlay"; + + public const string Darken = "darken"; + + public const string Lighten = "lighten"; + + public const string ColorDodge = "color-dodge"; + + public const string ColorBurn = "color-burn"; + + public const string HardLight = "hard-light"; + + public const string SoftLight = "soft-light"; + + public const string Difference = "difference"; + + public const string Exclusion = "exclusion"; + + public const string Hue = "hue"; + + public const string Saturation = "saturation"; + + public const string Color = "color"; + + public const string Luminosity = "luminosity"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle.cs new file mode 100644 index 0000000..d071be2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyleSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle Solid = + new(Values.Solid); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle Dashed = + new(Values.Dashed); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle Beveled = + new(Values.Beveled); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle Inset = + new(Values.Inset); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyleSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetBorderStyle value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Solid = "solid"; + + public const string Dashed = "dashed"; + + public const string Beveled = "beveled"; + + public const string Inset = "inset"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetColor.cs new file mode 100644 index 0000000..bfdf658 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily.cs new file mode 100644 index 0000000..b4339f0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily.cs @@ -0,0 +1,165 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamilySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Text = + new(Values.Text); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Checkbox = + new(Values.Checkbox); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Radio = + new(Values.Radio); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Combobox = + new(Values.Combobox); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Listbox = + new(Values.Listbox); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Pushbutton = + new(Values.Pushbutton); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Signature = + new(Values.Signature); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Unknown = + new(Values.Unknown); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamilySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFieldFamily value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Text = "text"; + + public const string Checkbox = "checkbox"; + + public const string Radio = "radio"; + + public const string Combobox = "combobox"; + + public const string Listbox = "listbox"; + + public const string Pushbutton = "pushbutton"; + + public const string Signature = "signature"; + + public const string Unknown = "unknown"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFlags.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFlags.cs new file mode 100644 index 0000000..c4666f3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFlags.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFlags + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("invisible")] + public required bool Invisible { get; set; } + + [JsonPropertyName("hidden")] + public required bool Hidden { get; set; } + + [JsonPropertyName("print")] + public required bool Print { get; set; } + + [JsonPropertyName("noZoom")] + public required bool NoZoom { get; set; } + + [JsonPropertyName("noRotate")] + public required bool NoRotate { get; set; } + + [JsonPropertyName("noView")] + public required bool NoView { get; set; } + + [JsonPropertyName("readOnly")] + public required bool ReadOnly { get; set; } + + [JsonPropertyName("locked")] + public required bool Locked { get; set; } + + [JsonPropertyName("toggleNoView")] + public required bool ToggleNoView { get; set; } + + [JsonPropertyName("lockedContents")] + public required bool LockedContents { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontColor.cs new file mode 100644 index 0000000..6e30cad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily.cs new file mode 100644 index 0000000..ff6873a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily.cs @@ -0,0 +1,195 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamilySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily Courier = + new(Values.Courier); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily CourierBold = + new(Values.CourierBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily CourierBoldOblique = + new(Values.CourierBoldOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily CourierOblique = + new(Values.CourierOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily Helvetica = + new(Values.Helvetica); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily HelveticaBold = + new(Values.HelveticaBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily HelveticaBoldOblique = + new(Values.HelveticaBoldOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily HelveticaOblique = + new(Values.HelveticaOblique); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily TimesRoman = + new(Values.TimesRoman); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily TimesBold = + new(Values.TimesBold); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily TimesBoldItalic = + new(Values.TimesBoldItalic); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily TimesItalic = + new(Values.TimesItalic); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily Symbol = + new(Values.Symbol); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily ZapfDingbats = + new(Values.ZapfDingbats); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamilySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetFontFamily value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Courier = "courier"; + + public const string CourierBold = "courier-bold"; + + public const string CourierBoldOblique = "courier-bold-oblique"; + + public const string CourierOblique = "courier-oblique"; + + public const string Helvetica = "helvetica"; + + public const string HelveticaBold = "helvetica-bold"; + + public const string HelveticaBoldOblique = "helvetica-bold-oblique"; + + public const string HelveticaOblique = "helvetica-oblique"; + + public const string TimesRoman = "times-roman"; + + public const string TimesBold = "times-bold"; + + public const string TimesBoldItalic = "times-bold-italic"; + + public const string TimesItalic = "times-italic"; + + public const string Symbol = "symbol"; + + public const string ZapfDingbats = "zapf-dingbats"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality.cs new file mode 100644 index 0000000..7797384 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQualitySerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality Durable = + new(Values.Durable); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality Weak = + new(Values.Weak); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQualitySerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetIdentityQuality value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Durable = "durable"; + + public const string Weak = "weak"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.cs new file mode 100644 index 0000000..12e4ea5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.cs @@ -0,0 +1,419 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber, + T + > onObjectNumber, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm, + T + > onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm? value + ) + { + if (Kind == "nm") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyTo.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex.cs new file mode 100644 index 0000000..99edc38 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndexRevision.cs new file mode 100644 index 0000000..d3061f6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm.cs new file mode 100644 index 0000000..3904459 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber.cs new file mode 100644 index 0000000..d4b1577 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInReplyToObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInteriorColor.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInteriorColor.cs new file mode 100644 index 0000000..d278113 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInteriorColor.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetInteriorColor + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("r")] + public required int R { get; set; } + + [JsonPropertyName("g")] + public required int G { get; set; } + + [JsonPropertyName("b")] + public required int B { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRect.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRect.cs new file mode 100644 index 0000000..8b67c4f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRect.cs @@ -0,0 +1,38 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRect + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("left")] + public required double Left { get; set; } + + [JsonPropertyName("bottom")] + public required double Bottom { get; set; } + + [JsonPropertyName("right")] + public required double Right { get; set; } + + [JsonPropertyName("top")] + public required double Top { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.cs new file mode 100644 index 0000000..2103fa5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.cs @@ -0,0 +1,414 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.ObjectNumber value + ) + { + Kind = "objectNumber"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Nm value + ) + { + Kind = "nm"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Index value + ) + { + Kind = "index"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "objectNumber" + /// + public bool IsObjectNumber => Kind == "objectNumber"; + + /// + /// Returns true if is "nm" + /// + public bool IsNm => Kind == "nm"; + + /// + /// Returns true if is "index" + /// + public bool IsIndex => Kind == "index"; + + /// + /// Returns the value as a if is 'objectNumber', otherwise throws an exception. + /// + /// Thrown when is not 'objectNumber'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber AsObjectNumber() => + IsObjectNumber + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Kind is not 'objectNumber'" + ); + + /// + /// Returns the value as a if is 'nm', otherwise throws an exception. + /// + /// Thrown when is not 'nm'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm AsNm() => + IsNm + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Kind is not 'nm'" + ); + + /// + /// Returns the value as a if is 'index', otherwise throws an exception. + /// + /// Thrown when is not 'index'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex AsIndex() => + IsIndex + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Kind is not 'index'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber, + T + > onObjectNumber, + Func onNm, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex, + T + > onIndex, + Func onUnknown_ + ) + { + return Kind switch + { + "objectNumber" => onObjectNumber(AsObjectNumber()), + "nm" => onNm(AsNm()), + "index" => onIndex(AsIndex()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onObjectNumber, + Action onNm, + Action onIndex, + Action onUnknown_ + ) + { + switch (Kind) + { + case "objectNumber": + onObjectNumber(AsObjectNumber()); + break; + case "nm": + onNm(AsNm()); + break; + case "index": + onIndex(AsIndex()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsObjectNumber( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber? value + ) + { + if (Kind == "objectNumber") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsNm( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm? value + ) + { + if (Kind == "nm") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsIndex( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex? value + ) + { + if (Kind == "index") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.ObjectNumber value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Nm value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Index value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "objectNumber" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber" + ), + "nm" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm" + ), + "index" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "objectNumber" => JsonSerializer.SerializeToNode(value.Value, options), + "nm" => JsonSerializer.SerializeToNode(value.Value, options), + "index" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for objectNumber + /// + [Serializable] + public struct ObjectNumber + { + public ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.ObjectNumber( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber value + ) => new(value); + } + + /// + /// Discriminated union type for nm + /// + [Serializable] + public struct Nm + { + public Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Nm( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm value + ) => new(value); + } + + /// + /// Discriminated union type for index + /// + [Serializable] + public struct Index + { + public Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRef.Index( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex.cs new file mode 100644 index 0000000..365f448 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndex + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("index")] + public required int Index { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndexRevision Revision { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndexRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndexRevision.cs new file mode 100644 index 0000000..9d0bf32 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndexRevision.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefIndexRevision + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm.cs new file mode 100644 index 0000000..79c2c38 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefNm + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("nm")] + public required string Nm { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber.cs new file mode 100644 index 0000000..330ad74 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetRefObjectNumber + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("annotObjectNumber")] + public required int AnnotObjectNumber { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType.cs new file mode 100644 index 0000000..2ee630f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyTypeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType Reply = + new(Values.Reply); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType Group = + new(Values.Group); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyTypeSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetReplyType value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Reply = "reply"; + + public const string Group = "group"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign.cs new file mode 100644 index 0000000..f3ba012 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign.cs @@ -0,0 +1,140 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlignSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign Left = + new(Values.Left); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign Center = + new(Values.Center); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign Right = + new(Values.Right); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlignSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemWidgetTextAlign value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Left = "left"; + + public const string Center = "center"; + + public const string Right = "right"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageState.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageState.cs new file mode 100644 index 0000000..0efb712 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageState.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemPageState : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("revision")] + public required DocAnnotationsListAll200ResponsePagesItemPageStateRevision Revision { get; set; } + + [JsonPropertyName("weakAnnotationState")] + public required DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState WeakAnnotationState { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateRevision.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateRevision.cs new file mode 100644 index 0000000..7f7dba0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateRevision.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemPageStateRevision : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("docSessionId")] + public required string DocSessionId { get; set; } + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("generation")] + public required int Generation { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.cs new file mode 100644 index 0000000..150a49a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.cs @@ -0,0 +1,330 @@ +// ReSharper disable NullableWarningSuppressionIsUsed +// ReSharper disable InconsistentNaming + +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState +{ + internal DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState with . + /// + public DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Unknown value + ) + { + Kind = "unknown"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState with . + /// + public DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Known value + ) + { + Kind = "known"; + Value = value.Value; + } + + /// + /// Discriminant value + /// + [JsonPropertyName("kind")] + public string Kind { get; internal set; } + + /// + /// Discriminated union value + /// + public object? Value { get; internal set; } + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Kind == "unknown"; + + /// + /// Returns true if is "known" + /// + public bool IsKnown => Kind == "known"; + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Kind is not 'unknown'" + ); + + /// + /// Returns the value as a if is 'known', otherwise throws an exception. + /// + /// Thrown when is not 'known'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown AsKnown() => + IsKnown + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Kind is not 'known'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown, + T + > onUnknown, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown, + T + > onKnown, + Func onUnknown_ + ) + { + return Kind switch + { + "unknown" => onUnknown(AsUnknown()), + "known" => onKnown(AsKnown()), + _ => onUnknown_(Kind, Value), + }; + } + + public void Visit( + Action onUnknown, + Action onKnown, + Action onUnknown_ + ) + { + switch (Kind) + { + case "unknown": + onUnknown(AsUnknown()); + break; + case "known": + onKnown(AsKnown()); + break; + default: + onUnknown_(Kind, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown? value + ) + { + if (Kind == "unknown") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsKnown( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown? value + ) + { + if (Kind == "known") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Unknown value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Known value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var json = JsonElement.ParseValue(ref reader); + if (!json.TryGetProperty("kind", out var discriminatorElement)) + { + throw new JsonException("Missing discriminator property 'kind'"); + } + if (discriminatorElement.ValueKind != JsonValueKind.String) + { + if (discriminatorElement.ValueKind == JsonValueKind.Null) + { + throw new JsonException("Discriminator property 'kind' is null"); + } + + throw new JsonException( + $"Discriminator property 'kind' is not a string, instead is {discriminatorElement.ToString()}" + ); + } + + var discriminator = + discriminatorElement.GetString() + ?? throw new JsonException("Discriminator property 'kind' is null"); + + // Strip the discriminant property to prevent it from leaking into AdditionalProperties + var jsonObject = System.Text.Json.Nodes.JsonObject.Create(json); + jsonObject?.Remove("kind"); + var jsonWithoutDiscriminator = + jsonObject != null ? JsonSerializer.SerializeToElement(jsonObject, options) : json; + + var value = discriminator switch + { + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown" + ), + "known" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Kind switch + { + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + "known" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["kind"] = value.Kind; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new JsonException("The JSON property name could not be read as a string."); + return new DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown value + ) => new(value); + } + + /// + /// Discriminated union type for known + /// + [Serializable] + public struct Known + { + public Known( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationState.Known( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown.cs new file mode 100644 index 0000000..795f30e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateKnown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("hasAnyWeakAnnotations")] + public required bool HasAnyWeakAnnotations { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown.cs new file mode 100644 index 0000000..37efa1e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemPageStateWeakAnnotationStateUnknown + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll404Response.cs b/src/CloudPDF/Types/DocAnnotationsListAll404Response.cs new file mode 100644 index 0000000..e3f59fc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll404Response.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll404Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required DocAnnotationsListAll404ResponseName Name { get; set; } + + [JsonPropertyName("code")] + public required DocAnnotationsListAll404ResponseCode Code { get; set; } + + [JsonPropertyName("message")] + public required string Message { get; set; } + + [JsonPropertyName("details")] + public Dictionary? Details { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll404ResponseCode.cs b/src/CloudPDF/Types/DocAnnotationsListAll404ResponseCode.cs new file mode 100644 index 0000000..097b79b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll404ResponseCode.cs @@ -0,0 +1,210 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll404ResponseCode.DocAnnotationsListAll404ResponseCodeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll404ResponseCode : IStringEnum +{ + public static readonly DocAnnotationsListAll404ResponseCode Unknown = new(Values.Unknown); + + public static readonly DocAnnotationsListAll404ResponseCode InvalidArg = new(Values.InvalidArg); + + public static readonly DocAnnotationsListAll404ResponseCode DocNotOpen = new(Values.DocNotOpen); + + public static readonly DocAnnotationsListAll404ResponseCode DocOpenFailed = new( + Values.DocOpenFailed + ); + + public static readonly DocAnnotationsListAll404ResponseCode DocPasswordRequired = new( + Values.DocPasswordRequired + ); + + public static readonly DocAnnotationsListAll404ResponseCode DocPasswordIncorrect = new( + Values.DocPasswordIncorrect + ); + + public static readonly DocAnnotationsListAll404ResponseCode SharePasswordRequired = new( + Values.SharePasswordRequired + ); + + public static readonly DocAnnotationsListAll404ResponseCode Aborted = new(Values.Aborted); + + public static readonly DocAnnotationsListAll404ResponseCode Network = new(Values.Network); + + public static readonly DocAnnotationsListAll404ResponseCode Unauthenticated = new( + Values.Unauthenticated + ); + + public static readonly DocAnnotationsListAll404ResponseCode Forbidden = new(Values.Forbidden); + + public static readonly DocAnnotationsListAll404ResponseCode NotFound = new(Values.NotFound); + + public static readonly DocAnnotationsListAll404ResponseCode WireFormat = new(Values.WireFormat); + + public static readonly DocAnnotationsListAll404ResponseCode RuntimeUnavailable = new( + Values.RuntimeUnavailable + ); + + public static readonly DocAnnotationsListAll404ResponseCode InvalidReference = new( + Values.InvalidReference + ); + + public static readonly DocAnnotationsListAll404ResponseCode WeakAnnotationSessionConflict = new( + Values.WeakAnnotationSessionConflict + ); + + public static readonly DocAnnotationsListAll404ResponseCode LayerVersionConflict = new( + Values.LayerVersionConflict + ); + + public static readonly DocAnnotationsListAll404ResponseCode NotImplemented = new( + Values.NotImplemented + ); + + public static readonly DocAnnotationsListAll404ResponseCode MalformedPdf = new( + Values.MalformedPdf + ); + + public DocAnnotationsListAll404ResponseCode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll404ResponseCode FromCustom(string value) + { + return new DocAnnotationsListAll404ResponseCode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocAnnotationsListAll404ResponseCode value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocAnnotationsListAll404ResponseCode value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocAnnotationsListAll404ResponseCode value) => + value.Value; + + public static explicit operator DocAnnotationsListAll404ResponseCode(string value) => + new(value); + + internal class DocAnnotationsListAll404ResponseCodeSerializer + : JsonConverter + { + public override DocAnnotationsListAll404ResponseCode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll404ResponseCode(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll404ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll404ResponseCode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll404ResponseCode(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll404ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "Unknown"; + + public const string InvalidArg = "InvalidArg"; + + public const string DocNotOpen = "DocNotOpen"; + + public const string DocOpenFailed = "DocOpenFailed"; + + public const string DocPasswordRequired = "DocPasswordRequired"; + + public const string DocPasswordIncorrect = "DocPasswordIncorrect"; + + public const string SharePasswordRequired = "SharePasswordRequired"; + + public const string Aborted = "Aborted"; + + public const string Network = "Network"; + + public const string Unauthenticated = "Unauthenticated"; + + public const string Forbidden = "Forbidden"; + + public const string NotFound = "NotFound"; + + public const string WireFormat = "WireFormat"; + + public const string RuntimeUnavailable = "RuntimeUnavailable"; + + public const string InvalidReference = "InvalidReference"; + + public const string WeakAnnotationSessionConflict = "WeakAnnotationSessionConflict"; + + public const string LayerVersionConflict = "LayerVersionConflict"; + + public const string NotImplemented = "NotImplemented"; + + public const string MalformedPdf = "MalformedPdf"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll404ResponseName.cs b/src/CloudPDF/Types/DocAnnotationsListAll404ResponseName.cs new file mode 100644 index 0000000..236c6b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll404ResponseName.cs @@ -0,0 +1,118 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll404ResponseName.DocAnnotationsListAll404ResponseNameSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll404ResponseName : IStringEnum +{ + public static readonly DocAnnotationsListAll404ResponseName EngineError = new( + Values.EngineError + ); + + public DocAnnotationsListAll404ResponseName(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll404ResponseName FromCustom(string value) + { + return new DocAnnotationsListAll404ResponseName(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocAnnotationsListAll404ResponseName value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocAnnotationsListAll404ResponseName value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocAnnotationsListAll404ResponseName value) => + value.Value; + + public static explicit operator DocAnnotationsListAll404ResponseName(string value) => + new(value); + + internal class DocAnnotationsListAll404ResponseNameSerializer + : JsonConverter + { + public override DocAnnotationsListAll404ResponseName Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll404ResponseName(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll404ResponseName value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll404ResponseName ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll404ResponseName(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll404ResponseName value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string EngineError = "EngineError"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll409Response.cs b/src/CloudPDF/Types/DocAnnotationsListAll409Response.cs new file mode 100644 index 0000000..204046f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll409Response.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll409Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required DocAnnotationsListAll409ResponseName Name { get; set; } + + [JsonPropertyName("code")] + public required DocAnnotationsListAll409ResponseCode Code { get; set; } + + [JsonPropertyName("message")] + public required string Message { get; set; } + + [JsonPropertyName("details")] + public Dictionary? Details { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll409ResponseCode.cs b/src/CloudPDF/Types/DocAnnotationsListAll409ResponseCode.cs new file mode 100644 index 0000000..9f0f9ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll409ResponseCode.cs @@ -0,0 +1,210 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll409ResponseCode.DocAnnotationsListAll409ResponseCodeSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll409ResponseCode : IStringEnum +{ + public static readonly DocAnnotationsListAll409ResponseCode Unknown = new(Values.Unknown); + + public static readonly DocAnnotationsListAll409ResponseCode InvalidArg = new(Values.InvalidArg); + + public static readonly DocAnnotationsListAll409ResponseCode DocNotOpen = new(Values.DocNotOpen); + + public static readonly DocAnnotationsListAll409ResponseCode DocOpenFailed = new( + Values.DocOpenFailed + ); + + public static readonly DocAnnotationsListAll409ResponseCode DocPasswordRequired = new( + Values.DocPasswordRequired + ); + + public static readonly DocAnnotationsListAll409ResponseCode DocPasswordIncorrect = new( + Values.DocPasswordIncorrect + ); + + public static readonly DocAnnotationsListAll409ResponseCode SharePasswordRequired = new( + Values.SharePasswordRequired + ); + + public static readonly DocAnnotationsListAll409ResponseCode Aborted = new(Values.Aborted); + + public static readonly DocAnnotationsListAll409ResponseCode Network = new(Values.Network); + + public static readonly DocAnnotationsListAll409ResponseCode Unauthenticated = new( + Values.Unauthenticated + ); + + public static readonly DocAnnotationsListAll409ResponseCode Forbidden = new(Values.Forbidden); + + public static readonly DocAnnotationsListAll409ResponseCode NotFound = new(Values.NotFound); + + public static readonly DocAnnotationsListAll409ResponseCode WireFormat = new(Values.WireFormat); + + public static readonly DocAnnotationsListAll409ResponseCode RuntimeUnavailable = new( + Values.RuntimeUnavailable + ); + + public static readonly DocAnnotationsListAll409ResponseCode InvalidReference = new( + Values.InvalidReference + ); + + public static readonly DocAnnotationsListAll409ResponseCode WeakAnnotationSessionConflict = new( + Values.WeakAnnotationSessionConflict + ); + + public static readonly DocAnnotationsListAll409ResponseCode LayerVersionConflict = new( + Values.LayerVersionConflict + ); + + public static readonly DocAnnotationsListAll409ResponseCode NotImplemented = new( + Values.NotImplemented + ); + + public static readonly DocAnnotationsListAll409ResponseCode MalformedPdf = new( + Values.MalformedPdf + ); + + public DocAnnotationsListAll409ResponseCode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll409ResponseCode FromCustom(string value) + { + return new DocAnnotationsListAll409ResponseCode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocAnnotationsListAll409ResponseCode value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocAnnotationsListAll409ResponseCode value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocAnnotationsListAll409ResponseCode value) => + value.Value; + + public static explicit operator DocAnnotationsListAll409ResponseCode(string value) => + new(value); + + internal class DocAnnotationsListAll409ResponseCodeSerializer + : JsonConverter + { + public override DocAnnotationsListAll409ResponseCode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll409ResponseCode(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll409ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll409ResponseCode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll409ResponseCode(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll409ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Unknown = "Unknown"; + + public const string InvalidArg = "InvalidArg"; + + public const string DocNotOpen = "DocNotOpen"; + + public const string DocOpenFailed = "DocOpenFailed"; + + public const string DocPasswordRequired = "DocPasswordRequired"; + + public const string DocPasswordIncorrect = "DocPasswordIncorrect"; + + public const string SharePasswordRequired = "SharePasswordRequired"; + + public const string Aborted = "Aborted"; + + public const string Network = "Network"; + + public const string Unauthenticated = "Unauthenticated"; + + public const string Forbidden = "Forbidden"; + + public const string NotFound = "NotFound"; + + public const string WireFormat = "WireFormat"; + + public const string RuntimeUnavailable = "RuntimeUnavailable"; + + public const string InvalidReference = "InvalidReference"; + + public const string WeakAnnotationSessionConflict = "WeakAnnotationSessionConflict"; + + public const string LayerVersionConflict = "LayerVersionConflict"; + + public const string NotImplemented = "NotImplemented"; + + public const string MalformedPdf = "MalformedPdf"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll409ResponseName.cs b/src/CloudPDF/Types/DocAnnotationsListAll409ResponseName.cs new file mode 100644 index 0000000..1428c94 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll409ResponseName.cs @@ -0,0 +1,118 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll409ResponseName.DocAnnotationsListAll409ResponseNameSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll409ResponseName : IStringEnum +{ + public static readonly DocAnnotationsListAll409ResponseName EngineError = new( + Values.EngineError + ); + + public DocAnnotationsListAll409ResponseName(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll409ResponseName FromCustom(string value) + { + return new DocAnnotationsListAll409ResponseName(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocAnnotationsListAll409ResponseName value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocAnnotationsListAll409ResponseName value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocAnnotationsListAll409ResponseName value) => + value.Value; + + public static explicit operator DocAnnotationsListAll409ResponseName(string value) => + new(value); + + internal class DocAnnotationsListAll409ResponseNameSerializer + : JsonConverter + { + public override DocAnnotationsListAll409ResponseName Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll409ResponseName(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll409ResponseName value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll409ResponseName ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll409ResponseName(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll409ResponseName value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string EngineError = "EngineError"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsUpdate200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocAnnotationsUpdate200ResponseMetaCacheDelta.cs index 0536ec4..414db83 100644 --- a/src/CloudPDF/Types/DocAnnotationsUpdate200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocAnnotationsUpdate200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocAnnotationsUpdate200ResponseMetaCacheDelta : IJsonOnDeserialize [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocFormsImportData200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocFormsImportData200ResponseMetaCacheDelta.cs index 2e064b7..2f3885e 100644 --- a/src/CloudPDF/Types/DocFormsImportData200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocFormsImportData200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocFormsImportData200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocFormsReset200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocFormsReset200ResponseMetaCacheDelta.cs index 7c791b8..65fa648 100644 --- a/src/CloudPDF/Types/DocFormsReset200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocFormsReset200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocFormsReset200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocFormsSetValue200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocFormsSetValue200ResponseMetaCacheDelta.cs index bbbccfd..90a1280 100644 --- a/src/CloudPDF/Types/DocFormsSetValue200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocFormsSetValue200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocFormsSetValue200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocManifest200Response.cs b/src/CloudPDF/Types/DocManifest200Response.cs index 114c973..ef41825 100644 --- a/src/CloudPDF/Types/DocManifest200Response.cs +++ b/src/CloudPDF/Types/DocManifest200Response.cs @@ -26,6 +26,9 @@ public record DocManifest200Response : IJsonOnDeserialized [JsonPropertyName("attachmentsVersion")] public int? AttachmentsVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("auditHead")] public required int AuditHead { get; set; } diff --git a/src/CloudPDF/Types/DocPagesDelete200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesDelete200ResponseMetaCacheDelta.cs index e6e1e79..30e3b1c 100644 --- a/src/CloudPDF/Types/DocPagesDelete200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocPagesDelete200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocPagesDelete200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocPagesFlatten200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesFlatten200ResponseMetaCacheDelta.cs index 5407be4..b61e598 100644 --- a/src/CloudPDF/Types/DocPagesFlatten200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocPagesFlatten200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocPagesFlatten200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocPagesInsert200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesInsert200ResponseMetaCacheDelta.cs index d74d156..3267818 100644 --- a/src/CloudPDF/Types/DocPagesInsert200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocPagesInsert200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocPagesInsert200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.cs index b7da230..69d80d3 100644 --- a/src/CloudPDF/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocPagesInsertBlank200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocPagesMove200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesMove200ResponseMetaCacheDelta.cs index 6ba7ab8..9322153 100644 --- a/src/CloudPDF/Types/DocPagesMove200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocPagesMove200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocPagesMove200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocPagesRotate200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesRotate200ResponseMetaCacheDelta.cs index a3d5369..265feaa 100644 --- a/src/CloudPDF/Types/DocPagesRotate200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocPagesRotate200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocPagesRotate200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List(); diff --git a/src/CloudPDF/Types/DocRedactionsApply200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocRedactionsApply200ResponseMetaCacheDelta.cs index b2523eb..a983ed5 100644 --- a/src/CloudPDF/Types/DocRedactionsApply200ResponseMetaCacheDelta.cs +++ b/src/CloudPDF/Types/DocRedactionsApply200ResponseMetaCacheDelta.cs @@ -17,6 +17,9 @@ public record DocRedactionsApply200ResponseMetaCacheDelta : IJsonOnDeserialized [JsonPropertyName("docVersion")] public required int DocVersion { get; set; } + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + [JsonPropertyName("pages")] public IEnumerable Pages { get; set; } = new List();