diff --git a/.fern/metadata.json b/.fern/metadata.json index 71a452b..f898346 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": "5f2d480665034420df58c19fd1328b0823104e0f", + "originGitCommit": "b7dddfba5011349a40db7878b5cbc8685b2d42cf", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0-next.13", + "requestedVersion": "3.0.0-next.14", "ciProvider": "github", - "sdkVersion": "3.0.0-next.13" + "sdkVersion": "3.0.0-next.14" } \ No newline at end of file diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index 8711044..de21a51 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "csharp", - "canonicalVersion": "3.0.0-next.13", - "sdkVersion": "3.0.0-next.13", + "canonicalVersion": "3.0.0-next.14", + "sdkVersion": "3.0.0-next.14", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "a472da9c7aed5db7f2b6b1f67f1b6268a9407afe9e7cf879ac04b878b4fc9dc7", - "gitCommit": "5f2d480665034420df58c19fd1328b0823104e0f", + "openapiSha256": "188ea071e3534971638ee3d1fb1f19c77f36e04b2a783f5eefdbe67326527ea6", + "gitCommit": "b7dddfba5011349a40db7878b5cbc8685b2d42cf", "gitCommitIsDirty": false }, "fern": { diff --git a/reference.md b/reference.md index 4d3691a..b23a5aa 100644 --- a/reference.md +++ b/reference.md @@ -2035,6 +2035,100 @@ await client.Doc.Metadata.GetAsync( ## Doc Pages +
client.Doc.Pages.SetScaleAsync(DocPagesSetScaleRequest { ... }) -> WithRawResponseTask<DocPagesSetScale200Response> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Doc.Pages.SetScaleAsync( + new DocPagesSetScaleRequest + { + DocId = "docId", + LayerName = "layerName", + Pon = 1, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `DocPagesSetScaleRequest` + +
+
+
+
+ + +
+
+
+ +
client.Doc.Pages.ViewportsAsync(ViewportsPagesRequest { ... }) -> WithRawResponseTask<IEnumerable<DocPagesViewports200ResponseItem>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Doc.Pages.ViewportsAsync( + new ViewportsPagesRequest + { + DocId = "docId", + LayerName = "layerName", + Pon = 1, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ViewportsPagesRequest` + +
+
+
+
+ + +
+
+
+
client.Doc.Pages.DeleteAsync(DeletePagesRequest { ... }) -> WithRawResponseTask<DocPagesDelete200Response>
diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/SetScaleTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/SetScaleTest.cs new file mode 100644 index 0000000..480620f --- /dev/null +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/SetScaleTest.cs @@ -0,0 +1,172 @@ +using CloudPDF.Doc; +using CloudPDF.Test.Unit.MockServer; +using CloudPDF.Test.Utils; +using NUnit.Framework; + +namespace CloudPDF.Test.Unit.MockServer.Doc.Pages; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class SetScaleTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest_1() + { + const string requestJson = """ + {} + """; + + const string mockResponse = """ + { + "pageObjectNumber": 1, + "meta": { + "affectedPages": [ + { + "pageObjectNumber": 1, + "revision": { + "docSessionId": "docSessionId", + "pageObjectNumber": 1, + "generation": 1 + }, + "weakAnnotationState": { + "kind": "unknown" + } + }, + { + "pageObjectNumber": 1, + "revision": { + "docSessionId": "docSessionId", + "pageObjectNumber": 1, + "generation": 1 + }, + "weakAnnotationState": { + "kind": "unknown" + } + } + ], + "cacheDelta": { + "previousDocVersion": 1, + "docVersion": 1, + "annotationsVersion": 1, + "layerVersion": 1, + "working": true, + "pages": [ + { + "pageObjectNumber": 1, + "cache": { + "contentVersion": 1, + "annotationVersion": 1 + } + }, + { + "pageObjectNumber": 1, + "cache": { + "contentVersion": 1, + "annotationVersion": 1 + } + } + ] + } + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/v1/docs/docId/layers/layerName/pages/1/scale") + .WithHeader("Content-Type", "application/json") + .UsingPut() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Doc.Pages.SetScaleAsync( + new DocPagesSetScaleRequest + { + DocId = "docId", + LayerName = "layerName", + Pon = 1, + Measure = null, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } + + [NUnit.Framework.Test] + public async Task MockServerTest_2() + { + const string requestJson = """ + {} + """; + + const string mockResponse = """ + { + "pageObjectNumber": 1, + "meta": { + "affectedPages": [ + { + "pageObjectNumber": 1, + "revision": { + "docSessionId": "docSessionId", + "pageObjectNumber": 1, + "generation": 1 + }, + "weakAnnotationState": { + "kind": "unknown" + } + } + ], + "cacheDelta": { + "previousDocVersion": 1, + "docVersion": 1, + "annotationsVersion": 1, + "layerVersion": 1, + "working": true, + "pages": [ + { + "pageObjectNumber": 1, + "cache": { + "contentVersion": 1, + "annotationVersion": 1 + } + } + ] + } + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/v1/docs/docId/layers/layerName/pages/1/scale") + .WithHeader("Content-Type", "application/json") + .UsingPut() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Doc.Pages.SetScaleAsync( + new DocPagesSetScaleRequest + { + DocId = "docId", + LayerName = "layerName", + Pon = 1, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/ViewportsTest.cs b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/ViewportsTest.cs new file mode 100644 index 0000000..c44fa34 --- /dev/null +++ b/src/CloudPDF.Test/Unit/MockServer/Doc/Pages/ViewportsTest.cs @@ -0,0 +1,476 @@ +using CloudPDF.Doc; +using CloudPDF.Test.Unit.MockServer; +using CloudPDF.Test.Utils; +using NUnit.Framework; + +namespace CloudPDF.Test.Unit.MockServer.Doc.Pages; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class ViewportsTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest_1() + { + const string mockResponse = """ + [ + { + "bbox": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "name": "name", + "measure": { + "subtype": "RL", + "ratio": "ratio", + "x": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "y": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "distance": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "area": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "angle": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "slope": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "origin": { + "x": 1.1, + "y": 1.1 + }, + "cyx": 1.1 + }, + "owned": true + }, + { + "bbox": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "name": "name", + "measure": { + "subtype": "RL", + "ratio": "ratio", + "x": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "y": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "distance": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "area": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "angle": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "slope": [ + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + }, + { + "unit": "unit", + "conversion": 1.1, + "fraction": "decimal", + "precision": 1, + "fixed": true, + "thousands": "thousands", + "decimal": "decimal", + "prefixSpacing": "prefixSpacing", + "suffixSpacing": "suffixSpacing", + "labelPosition": "suffix" + } + ], + "origin": { + "x": 1.1, + "y": 1.1 + }, + "cyx": 1.1 + }, + "owned": true + } + ] + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/v1/docs/docId/layers/layerName/pages/1/viewports") + .UsingGet() + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Doc.Pages.ViewportsAsync( + new ViewportsPagesRequest + { + DocId = "docId", + LayerName = "layerName", + Pon = 1, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } + + [NUnit.Framework.Test] + public async Task MockServerTest_2() + { + const string mockResponse = """ + [ + { + "bbox": { + "left": 1.1, + "bottom": 1.1, + "right": 1.1, + "top": 1.1 + }, + "name": "name", + "measure": { + "subtype": "RL", + "ratio": "ratio", + "x": [ + { + "unit": "unit" + } + ], + "y": [ + { + "unit": "unit" + } + ], + "distance": [ + { + "unit": "unit" + } + ], + "area": [ + { + "unit": "unit" + } + ], + "angle": [ + { + "unit": "unit" + } + ], + "slope": [ + { + "unit": "unit" + } + ], + "origin": { + "x": 1.1, + "y": 1.1 + }, + "cyx": 1.1 + }, + "owned": true + } + ] + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/v1/docs/docId/layers/layerName/pages/1/viewports") + .UsingGet() + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Doc.Pages.ViewportsAsync( + new ViewportsPagesRequest + { + DocId = "docId", + LayerName = "layerName", + Pon = 1, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/src/CloudPDF/CloudPDF.csproj b/src/CloudPDF/CloudPDF.csproj index afa16aa..8bbfe6a 100644 --- a/src/CloudPDF/CloudPDF.csproj +++ b/src/CloudPDF/CloudPDF.csproj @@ -11,7 +11,7 @@ enable 12 enable - 3.0.0-next.13 + 3.0.0-next.14 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 a9cfc6d..47e3fa9 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.13"; + public const string Current = "3.0.0-next.14"; } diff --git a/src/CloudPDF/Doc/Pages/IPagesClient.cs b/src/CloudPDF/Doc/Pages/IPagesClient.cs index 3b11e82..f4d6628 100644 --- a/src/CloudPDF/Doc/Pages/IPagesClient.cs +++ b/src/CloudPDF/Doc/Pages/IPagesClient.cs @@ -4,6 +4,18 @@ namespace CloudPDF.Doc; public partial interface IPagesClient { + WithRawResponseTask SetScaleAsync( + DocPagesSetScaleRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + + WithRawResponseTask> ViewportsAsync( + ViewportsPagesRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + WithRawResponseTask DeleteAsync( DeletePagesRequest request, RequestOptions? options = null, diff --git a/src/CloudPDF/Doc/Pages/PagesClient.cs b/src/CloudPDF/Doc/Pages/PagesClient.cs index fd5d4c5..9bbb3c1 100644 --- a/src/CloudPDF/Doc/Pages/PagesClient.cs +++ b/src/CloudPDF/Doc/Pages/PagesClient.cs @@ -13,6 +13,244 @@ internal PagesClient(RawClient client) _client = client; } + private async Task> SetScaleAsyncCore( + DocPagesSetScaleRequest 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.Put, + Path = string.Format( + "v1/docs/{0}/layers/{1}/pages/{2}/scale", + ValueConvert.ToPathParameterString(request.DocId), + ValueConvert.ToPathParameterString(request.LayerName), + ValueConvert.ToPathParameterString(request.Pon) + ), + Body = request, + QueryString = _queryString, + Headers = _headers, + ContentType = "application/json", + 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 400: + throw new BadRequestError( + 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 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), + } + ); + } + } + 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< + WithRawResponse> + > ViewportsAsyncCore( + ViewportsPagesRequest 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}/pages/{2}/viewports", + ValueConvert.ToPathParameterString(request.DocId), + ValueConvert.ToPathParameterString(request.LayerName), + ValueConvert.ToPathParameterString(request.Pon) + ), + 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< + IEnumerable + >(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), + } + ); + } + } + 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> DeleteAsyncCore( DeletePagesRequest request, RequestOptions? options = null, @@ -1091,6 +1329,48 @@ private async Task> RotateAsyncCore( } } + /// + /// await client.Doc.Pages.SetScaleAsync( + /// new DocPagesSetScaleRequest + /// { + /// DocId = "docId", + /// LayerName = "layerName", + /// Pon = 1, + /// } + /// ); + /// + public WithRawResponseTask SetScaleAsync( + DocPagesSetScaleRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask( + SetScaleAsyncCore(request, options, cancellationToken) + ); + } + + /// + /// await client.Doc.Pages.ViewportsAsync( + /// new ViewportsPagesRequest + /// { + /// DocId = "docId", + /// LayerName = "layerName", + /// Pon = 1, + /// } + /// ); + /// + public WithRawResponseTask> ViewportsAsync( + ViewportsPagesRequest request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + ViewportsAsyncCore(request, options, cancellationToken) + ); + } + /// /// await client.Doc.Pages.DeleteAsync( /// new DeletePagesRequest diff --git a/src/CloudPDF/Doc/Pages/Requests/DocPagesSetScaleRequest.cs b/src/CloudPDF/Doc/Pages/Requests/DocPagesSetScaleRequest.cs new file mode 100644 index 0000000..959ded1 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Requests/DocPagesSetScaleRequest.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequest +{ + [JsonIgnore] + public required string DocId { get; set; } + + [JsonIgnore] + public required string LayerName { get; set; } + + [JsonIgnore] + public required int Pon { 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; } + + [JsonPropertyName("measure")] + public DocPagesSetScaleRequestMeasure? Measure { get; set; } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Requests/ViewportsPagesRequest.cs b/src/CloudPDF/Doc/Pages/Requests/ViewportsPagesRequest.cs new file mode 100644 index 0000000..5211677 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Requests/ViewportsPagesRequest.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record ViewportsPagesRequest +{ + [JsonIgnore] + public required string DocId { get; set; } + + [JsonIgnore] + public required string LayerName { get; set; } + + [JsonIgnore] + public required int Pon { 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/Doc/Pages/Types/DocPagesSetScaleRequestMeasure.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasure.cs new file mode 100644 index 0000000..b60baff --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasure.cs @@ -0,0 +1,59 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasure : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("subtype")] + public required DocPagesSetScaleRequestMeasureSubtype Subtype { get; set; } + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocPagesSetScaleRequestMeasureOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItem.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItem.cs new file mode 100644 index 0000000..94edbb5 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureAngleItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public required double Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesSetScaleRequestMeasureAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesSetScaleRequestMeasureAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItemFraction.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItemFraction.cs new file mode 100644 index 0000000..49cc46a --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItemFraction.cs @@ -0,0 +1,140 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureAngleItemFraction.DocPagesSetScaleRequestMeasureAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureAngleItemFraction : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureAngleItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesSetScaleRequestMeasureAngleItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesSetScaleRequestMeasureAngleItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesSetScaleRequestMeasureAngleItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesSetScaleRequestMeasureAngleItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureAngleItemFraction FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureAngleItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScaleRequestMeasureAngleItemFraction value) => + value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureAngleItemFraction(string value) => + new(value); + + internal class DocPagesSetScaleRequestMeasureAngleItemFractionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAngleItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAngleItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItemLabelPosition.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItemLabelPosition.cs new file mode 100644 index 0000000..475166c --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAngleItemLabelPosition.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureAngleItemLabelPosition.DocPagesSetScaleRequestMeasureAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureAngleItemLabelPosition : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureAngleItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesSetScaleRequestMeasureAngleItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesSetScaleRequestMeasureAngleItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureAngleItemLabelPosition FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureAngleItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAngleItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAngleItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItem.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItem.cs new file mode 100644 index 0000000..1572fc0 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureAreaItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public required double Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesSetScaleRequestMeasureAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesSetScaleRequestMeasureAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItemFraction.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItemFraction.cs new file mode 100644 index 0000000..aa344a1 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItemFraction.cs @@ -0,0 +1,138 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureAreaItemFraction.DocPagesSetScaleRequestMeasureAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureAreaItemFraction : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureAreaItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesSetScaleRequestMeasureAreaItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesSetScaleRequestMeasureAreaItemFraction Round = new(Values.Round); + + public static readonly DocPagesSetScaleRequestMeasureAreaItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesSetScaleRequestMeasureAreaItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureAreaItemFraction FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureAreaItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScaleRequestMeasureAreaItemFraction value) => + value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureAreaItemFraction(string value) => + new(value); + + internal class DocPagesSetScaleRequestMeasureAreaItemFractionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAreaItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAreaItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItemLabelPosition.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItemLabelPosition.cs new file mode 100644 index 0000000..9c736c2 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureAreaItemLabelPosition.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureAreaItemLabelPosition.DocPagesSetScaleRequestMeasureAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureAreaItemLabelPosition : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureAreaItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesSetScaleRequestMeasureAreaItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesSetScaleRequestMeasureAreaItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureAreaItemLabelPosition FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureAreaItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAreaItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureAreaItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItem.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItem.cs new file mode 100644 index 0000000..e5c949f --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureDistanceItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public required double Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesSetScaleRequestMeasureDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesSetScaleRequestMeasureDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItemFraction.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItemFraction.cs new file mode 100644 index 0000000..110fdac --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItemFraction.cs @@ -0,0 +1,142 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureDistanceItemFraction.DocPagesSetScaleRequestMeasureDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureDistanceItemFraction : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureDistanceItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesSetScaleRequestMeasureDistanceItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesSetScaleRequestMeasureDistanceItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesSetScaleRequestMeasureDistanceItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesSetScaleRequestMeasureDistanceItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureDistanceItemFraction FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureDistanceItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureDistanceItemFraction( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureDistanceItemFractionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureDistanceItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureDistanceItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItemLabelPosition.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItemLabelPosition.cs new file mode 100644 index 0000000..60a97d7 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureDistanceItemLabelPosition.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureDistanceItemLabelPosition.DocPagesSetScaleRequestMeasureDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureDistanceItemLabelPosition : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureDistanceItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesSetScaleRequestMeasureDistanceItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesSetScaleRequestMeasureDistanceItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureDistanceItemLabelPosition FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureDistanceItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureDistanceItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureDistanceItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureOrigin.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureOrigin.cs new file mode 100644 index 0000000..b5af7fd --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureOrigin.cs @@ -0,0 +1,32 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureOrigin : 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/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItem.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItem.cs new file mode 100644 index 0000000..8373506 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureSlopeItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public required double Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesSetScaleRequestMeasureSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesSetScaleRequestMeasureSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItemFraction.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItemFraction.cs new file mode 100644 index 0000000..1e16c41 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItemFraction.cs @@ -0,0 +1,140 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureSlopeItemFraction.DocPagesSetScaleRequestMeasureSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureSlopeItemFraction : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureSlopeItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesSetScaleRequestMeasureSlopeItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesSetScaleRequestMeasureSlopeItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesSetScaleRequestMeasureSlopeItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesSetScaleRequestMeasureSlopeItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureSlopeItemFraction FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureSlopeItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScaleRequestMeasureSlopeItemFraction value) => + value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureSlopeItemFraction(string value) => + new(value); + + internal class DocPagesSetScaleRequestMeasureSlopeItemFractionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureSlopeItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureSlopeItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItemLabelPosition.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItemLabelPosition.cs new file mode 100644 index 0000000..3667d15 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSlopeItemLabelPosition.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureSlopeItemLabelPosition.DocPagesSetScaleRequestMeasureSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureSlopeItemLabelPosition : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureSlopeItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesSetScaleRequestMeasureSlopeItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesSetScaleRequestMeasureSlopeItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureSlopeItemLabelPosition FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureSlopeItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureSlopeItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureSlopeItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSubtype.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSubtype.cs new file mode 100644 index 0000000..2899b41 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureSubtype.cs @@ -0,0 +1,116 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureSubtype.DocPagesSetScaleRequestMeasureSubtypeSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureSubtype : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureSubtype Rl = new(Values.Rl); + + public DocPagesSetScaleRequestMeasureSubtype(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureSubtype FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureSubtype(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesSetScaleRequestMeasureSubtype value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesSetScaleRequestMeasureSubtype value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScaleRequestMeasureSubtype value) => + value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureSubtype(string value) => + new(value); + + internal class DocPagesSetScaleRequestMeasureSubtypeSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureSubtype Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureSubtype(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureSubtype value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureSubtype ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureSubtype(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureSubtype value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Rl = "RL"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItem.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItem.cs new file mode 100644 index 0000000..956faa7 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItem.cs @@ -0,0 +1,56 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureXItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public required double Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesSetScaleRequestMeasureXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesSetScaleRequestMeasureXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItemFraction.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItemFraction.cs new file mode 100644 index 0000000..67ac052 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItemFraction.cs @@ -0,0 +1,138 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureXItemFraction.DocPagesSetScaleRequestMeasureXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureXItemFraction : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureXItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesSetScaleRequestMeasureXItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesSetScaleRequestMeasureXItemFraction Round = new(Values.Round); + + public static readonly DocPagesSetScaleRequestMeasureXItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesSetScaleRequestMeasureXItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureXItemFraction FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureXItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScaleRequestMeasureXItemFraction value) => + value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureXItemFraction(string value) => + new(value); + + internal class DocPagesSetScaleRequestMeasureXItemFractionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureXItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureXItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItemLabelPosition.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItemLabelPosition.cs new file mode 100644 index 0000000..514807e --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureXItemLabelPosition.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureXItemLabelPosition.DocPagesSetScaleRequestMeasureXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureXItemLabelPosition : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureXItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesSetScaleRequestMeasureXItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesSetScaleRequestMeasureXItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureXItemLabelPosition FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureXItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureXItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureXItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureXItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureXItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItem.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItem.cs new file mode 100644 index 0000000..398b28f --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItem.cs @@ -0,0 +1,56 @@ +using CloudPDF; +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[Serializable] +public record DocPagesSetScaleRequestMeasureYItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public required double Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesSetScaleRequestMeasureYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesSetScaleRequestMeasureYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItemFraction.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItemFraction.cs new file mode 100644 index 0000000..a0bbf73 --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItemFraction.cs @@ -0,0 +1,138 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureYItemFraction.DocPagesSetScaleRequestMeasureYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureYItemFraction : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureYItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesSetScaleRequestMeasureYItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesSetScaleRequestMeasureYItemFraction Round = new(Values.Round); + + public static readonly DocPagesSetScaleRequestMeasureYItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesSetScaleRequestMeasureYItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureYItemFraction FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureYItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScaleRequestMeasureYItemFraction value) => + value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureYItemFraction(string value) => + new(value); + + internal class DocPagesSetScaleRequestMeasureYItemFractionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureYItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureYItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItemLabelPosition.cs b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItemLabelPosition.cs new file mode 100644 index 0000000..3a11acd --- /dev/null +++ b/src/CloudPDF/Doc/Pages/Types/DocPagesSetScaleRequestMeasureYItemLabelPosition.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF.Doc; + +[JsonConverter( + typeof(DocPagesSetScaleRequestMeasureYItemLabelPosition.DocPagesSetScaleRequestMeasureYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesSetScaleRequestMeasureYItemLabelPosition : IStringEnum +{ + public static readonly DocPagesSetScaleRequestMeasureYItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesSetScaleRequestMeasureYItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesSetScaleRequestMeasureYItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScaleRequestMeasureYItemLabelPosition FromCustom(string value) + { + return new DocPagesSetScaleRequestMeasureYItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesSetScaleRequestMeasureYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesSetScaleRequestMeasureYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesSetScaleRequestMeasureYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesSetScaleRequestMeasureYItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesSetScaleRequestMeasureYItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesSetScaleRequestMeasureYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureYItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScaleRequestMeasureYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScaleRequestMeasureYItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScaleRequestMeasureYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs index d791245..b5f6670 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLine.cs @@ -11,6 +11,18 @@ public record DocAnnotationsList200ResponseAnnotationsItemLine : IJsonOnDeserial private readonly IDictionary _extensionData = new Dictionary(); + [JsonPropertyName("intent")] + public DocAnnotationsList200ResponseAnnotationsItemLineIntent? Intent { get; set; } + + [JsonPropertyName("measure")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasure? Measure { get; set; } + + [JsonPropertyName("caption")] + public DocAnnotationsList200ResponseAnnotationsItemLineCaption? Caption { get; set; } + + [JsonPropertyName("leader")] + public DocAnnotationsList200ResponseAnnotationsItemLineLeader? Leader { get; set; } + [JsonPropertyName("ref")] public required DocAnnotationsList200ResponseAnnotationsItemLineRef Ref { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaption.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaption.cs new file mode 100644 index 0000000..3f05bba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaption.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineCaption : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("enabled")] + public required bool Enabled { get; set; } + + [JsonPropertyName("position")] + public DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition? Position { get; set; } + + [JsonPropertyName("offset")] + public DocAnnotationsList200ResponseAnnotationsItemLineCaptionOffset? Offset { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaptionOffset.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaptionOffset.cs new file mode 100644 index 0000000..db99dd9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaptionOffset.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineCaptionOffset : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("along")] + public required double Along { get; set; } + + [JsonPropertyName("perpendicular")] + public required double Perpendicular { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition.cs new file mode 100644 index 0000000..ed29b69 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition.cs @@ -0,0 +1,131 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition.DocAnnotationsList200ResponseAnnotationsItemLineCaptionPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition Inline = + new(Values.Inline); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition Top = + new(Values.Top); + + public DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineCaptionPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineCaptionPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Inline = "inline"; + + public const string Top = "top"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineIntent.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineIntent.cs new file mode 100644 index 0000000..88a3f2f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineIntent.cs @@ -0,0 +1,129 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineIntent.DocAnnotationsList200ResponseAnnotationsItemLineIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineIntent : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineIntent LineArrow = new( + Values.LineArrow + ); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineIntent LineDimension = + new(Values.LineDimension); + + public DocAnnotationsList200ResponseAnnotationsItemLineIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineIntent FromCustom(string value) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineIntent( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineIntentSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineIntent(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineIntent(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string LineArrow = "LineArrow"; + + public const string LineDimension = "LineDimension"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineLeader.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineLeader.cs new file mode 100644 index 0000000..501afda --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineLeader.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineLeader : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("length")] + public required double Length { get; set; } + + [JsonPropertyName("extension")] + public double? Extension { get; set; } + + [JsonPropertyName("offset")] + public double? Offset { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasure.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasure.cs new file mode 100644 index 0000000..6874adc --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasure.cs @@ -0,0 +1,392 @@ +// 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(DocAnnotationsList200ResponseAnnotationsItemLineMeasure.JsonConverter))] +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasure +{ + internal DocAnnotationsList200ResponseAnnotationsItemLineMeasure(string type, object? value) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemLineMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Rl value + ) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemLineMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemLineMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func onRl, + Func onGeo, + Func onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl? value + ) + { + if (Subtype == "RL") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo? value + ) + { + if (Subtype == "GEO") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown? value + ) + { + if (Subtype == "unknown") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown)Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Rl value + ) => new(value); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Geo value + ) => new(value); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasure).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasure 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 DocAnnotationsList200ResponseAnnotationsItemLineMeasure( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl(CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Rl( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo(CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Geo( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasure.Unknown( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo.cs new file mode 100644 index 0000000..ab25972 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo.cs @@ -0,0 +1,25 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureGeo : 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/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl.cs new file mode 100644 index 0000000..37eb25d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRl : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItem.cs new file mode 100644 index 0000000..d6e94b7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..11d8e64 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..8603c5f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItem.cs new file mode 100644 index 0000000..9b4d06a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..83c2432 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..0006469 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItem.cs new file mode 100644 index 0000000..3483ea4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..d3ce6f8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..4717596 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlOrigin.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlOrigin.cs new file mode 100644 index 0000000..2c009d8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlOrigin.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlOrigin : 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/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItem.cs new file mode 100644 index 0000000..ffdfc28 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..60b83f1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..51a7880 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItem.cs new file mode 100644 index 0000000..a6cbcf5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction.cs new file mode 100644 index 0000000..bb3b23e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..e80bdaa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItem.cs new file mode 100644 index 0000000..11215a8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction.cs new file mode 100644 index 0000000..5d2d837 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..b5bc9de --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemLineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown.cs new file mode 100644 index 0000000..e8af870 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown.cs @@ -0,0 +1,25 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemLineMeasureUnknown : 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/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs index 2bf695c..88e4430 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygon.cs @@ -11,6 +11,15 @@ public record DocAnnotationsList200ResponseAnnotationsItemPolygon : IJsonOnDeser private readonly IDictionary _extensionData = new Dictionary(); + [JsonPropertyName("intent")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonIntent? Intent { get; set; } + + [JsonPropertyName("measure")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure? Measure { get; set; } + + [JsonPropertyName("caption")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonCaption? Caption { get; set; } + [JsonPropertyName("ref")] public required DocAnnotationsList200ResponseAnnotationsItemPolygonRef Ref { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonCaption.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonCaption.cs new file mode 100644 index 0000000..b3227d6 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonCaption.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonCaption : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("enabled")] + public required bool Enabled { get; set; } + + [JsonPropertyName("center")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonCaptionCenter? Center { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonCaptionCenter.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonCaptionCenter.cs new file mode 100644 index 0000000..3b5fe56 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonCaptionCenter.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonCaptionCenter : 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/DocAnnotationsList200ResponseAnnotationsItemPolygonIntent.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonIntent.cs new file mode 100644 index 0000000..df156e2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonIntent.cs @@ -0,0 +1,129 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonIntent.DocAnnotationsList200ResponseAnnotationsItemPolygonIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonIntent + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonIntent PolygonCloud = + new(Values.PolygonCloud); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonIntent PolygonDimension = + new(Values.PolygonDimension); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonIntent FromCustom(string value) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonIntent( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonIntentSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonIntent(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonIntent(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string PolygonCloud = "PolygonCloud"; + + public const string PolygonDimension = "PolygonDimension"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.cs new file mode 100644 index 0000000..49a1458 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.cs @@ -0,0 +1,396 @@ +// 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(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.JsonConverter))] +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure +{ + internal DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure(string type, object? value) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Rl value + ) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func onRl, + Func onGeo, + Func< + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown, + T + > onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl? value + ) + { + if (Subtype == "RL") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo? value + ) + { + if (Subtype == "GEO") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown? value + ) + { + if (Subtype == "unknown") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Rl value + ) => new(value); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Geo value + ) => new(value); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure 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 DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl(CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Rl( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo(CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Geo( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasure.Unknown( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo.cs new file mode 100644 index 0000000..1733c3f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo.cs @@ -0,0 +1,25 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureGeo : 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/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl.cs new file mode 100644 index 0000000..bd23078 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRl : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItem.cs new file mode 100644 index 0000000..d56b8b2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..03068f7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..17ee92e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItem.cs new file mode 100644 index 0000000..38d0518 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..ee3e39d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..33e4e29 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItem.cs new file mode 100644 index 0000000..0a62f6d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..2737ad5 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..e583fba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlOrigin.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlOrigin.cs new file mode 100644 index 0000000..add53da --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlOrigin.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlOrigin + : 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/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItem.cs new file mode 100644 index 0000000..b82635d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..4de85c9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..3013a86 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItem.cs new file mode 100644 index 0000000..65f21d1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction.cs new file mode 100644 index 0000000..b27eb1a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..5c92050 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItem.cs new file mode 100644 index 0000000..c30a0c0 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction.cs new file mode 100644 index 0000000..10d4630 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction.cs @@ -0,0 +1,145 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..53f4c1a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown.cs new file mode 100644 index 0000000..a5803fa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolygonMeasureUnknown + : 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/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs index ea17c45..ffbe2fb 100644 --- a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolyline.cs @@ -11,6 +11,15 @@ public record DocAnnotationsList200ResponseAnnotationsItemPolyline : IJsonOnDese private readonly IDictionary _extensionData = new Dictionary(); + [JsonPropertyName("intent")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineIntent? Intent { get; set; } + + [JsonPropertyName("measure")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure? Measure { get; set; } + + [JsonPropertyName("caption")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineCaption? Caption { get; set; } + [JsonPropertyName("ref")] public required DocAnnotationsList200ResponseAnnotationsItemPolylineRef Ref { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineCaption.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineCaption.cs new file mode 100644 index 0000000..0c11ce7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineCaption.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineCaption : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("enabled")] + public required bool Enabled { get; set; } + + [JsonPropertyName("center")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineCaptionCenter? Center { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineCaptionCenter.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineCaptionCenter.cs new file mode 100644 index 0000000..0e06201 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineCaptionCenter.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineCaptionCenter + : 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/DocAnnotationsList200ResponseAnnotationsItemPolylineIntent.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineIntent.cs new file mode 100644 index 0000000..91c789a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineIntent.cs @@ -0,0 +1,126 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineIntent.DocAnnotationsList200ResponseAnnotationsItemPolylineIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineIntent + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineIntent PolyLineDimension = + new(Values.PolyLineDimension); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineIntent FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineIntent( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineIntentSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineIntent(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineIntent(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string PolyLineDimension = "PolyLineDimension"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.cs new file mode 100644 index 0000000..5abb17f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.cs @@ -0,0 +1,396 @@ +// 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(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.JsonConverter))] +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure +{ + internal DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure(string type, object? value) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Rl value + ) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure with . + /// + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown)Value! + : throw new global::System.Exception( + "DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func onRl, + Func onGeo, + Func< + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown, + T + > onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl? value + ) + { + if (Subtype == "RL") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo? value + ) + { + if (Subtype == "GEO") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown? value + ) + { + if (Subtype == "unknown") + { + value = (CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Rl value + ) => new(value); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Geo value + ) => new(value); + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure 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 DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl(CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Rl( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo(CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo value) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Geo( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasure.Unknown( + CloudPDF.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo.cs new file mode 100644 index 0000000..ae3a516 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo.cs @@ -0,0 +1,25 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureGeo : 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/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl.cs new file mode 100644 index 0000000..2703818 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRl : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItem.cs new file mode 100644 index 0000000..76d1ac8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..a49fd1d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..f583b31 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItem.cs new file mode 100644 index 0000000..a9d32af --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..17f15d1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..a4a0bf3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItem.cs new file mode 100644 index 0000000..3a5514d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..c197d90 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..7d0093b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlOrigin.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlOrigin.cs new file mode 100644 index 0000000..c1d94ba --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlOrigin.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlOrigin + : 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/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItem.cs new file mode 100644 index 0000000..9a7675f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..637822e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..8354334 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItem.cs new file mode 100644 index 0000000..7bad9e1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction.cs new file mode 100644 index 0000000..b9a0589 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..da5a58e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItem.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItem.cs new file mode 100644 index 0000000..2f38f99 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction.cs new file mode 100644 index 0000000..73b636a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction.cs @@ -0,0 +1,147 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..07b7dc9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition.DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown.cs b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown.cs new file mode 100644 index 0000000..8f7de62 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsList200ResponseAnnotationsItemPolylineMeasureUnknown + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs index fc2e122..fdc1fbc 100644 --- a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine.cs @@ -11,6 +11,18 @@ public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLine : IJs private readonly IDictionary _extensionData = new Dictionary(); + [JsonPropertyName("intent")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent? Intent { get; set; } + + [JsonPropertyName("measure")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure? Measure { get; set; } + + [JsonPropertyName("caption")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaption? Caption { get; set; } + + [JsonPropertyName("leader")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLeader? Leader { get; set; } + [JsonPropertyName("ref")] public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineRef Ref { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaption.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaption.cs new file mode 100644 index 0000000..2010fa8 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaption.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaption + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("enabled")] + public required bool Enabled { get; set; } + + [JsonPropertyName("position")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition? Position { get; set; } + + [JsonPropertyName("offset")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionOffset? Offset { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionOffset.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionOffset.cs new file mode 100644 index 0000000..3e3107b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionOffset.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionOffset + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("along")] + public required double Along { get; set; } + + [JsonPropertyName("perpendicular")] + public required double Perpendicular { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition.cs new file mode 100644 index 0000000..a2b2a23 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition.cs @@ -0,0 +1,137 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition Inline = + new(Values.Inline); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition Top = + new(Values.Top); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineCaptionPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Inline = "inline"; + + public const string Top = "top"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent.cs new file mode 100644 index 0000000..b87c645 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent LineArrow = + new(Values.LineArrow); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent LineDimension = + new(Values.LineDimension); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string LineArrow = "LineArrow"; + + public const string LineDimension = "LineDimension"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLeader.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLeader.cs new file mode 100644 index 0000000..b7c1206 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLeader.cs @@ -0,0 +1,35 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineLeader + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("length")] + public required double Length { get; set; } + + [JsonPropertyName("extension")] + public double? Extension { get; set; } + + [JsonPropertyName("offset")] + public double? Offset { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.cs new file mode 100644 index 0000000..00bb6e7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.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(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + string type, + object? value + ) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Rl value + ) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl)Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl, + T + > onRl, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo, + T + > onGeo, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown, + T + > onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl? value + ) + { + if (Subtype == "RL") + { + value = (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo? value + ) + { + if (Subtype == "GEO") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown? value + ) + { + if (Subtype == "unknown") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Rl value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Geo value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure 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 DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Rl( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Geo( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasure.Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo.cs new file mode 100644 index 0000000..683ce2a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureGeo + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl.cs new file mode 100644 index 0000000..2bca71d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRl + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItem.cs new file mode 100644 index 0000000..a8b5d9f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..a73d1c7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..10d9cda --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItem.cs new file mode 100644 index 0000000..710f2df --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..5fe8de4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..4fe5c0a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItem.cs new file mode 100644 index 0000000..0cf9712 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..7d4e5aa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..716d194 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlOrigin.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlOrigin.cs new file mode 100644 index 0000000..b88b9d7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlOrigin.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlOrigin + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItem.cs new file mode 100644 index 0000000..adfe9b7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..b0308b3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..2bb6d14 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItem.cs new file mode 100644 index 0000000..3512b8f --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction.cs new file mode 100644 index 0000000..5b3513e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..280a830 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItem.cs new file mode 100644 index 0000000..a7da94e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction.cs new file mode 100644 index 0000000..429c476 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..a053a21 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown.cs new file mode 100644 index 0000000..28bff3c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemLineMeasureUnknown + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs index c64fa61..6acaaec 100644 --- a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon.cs @@ -11,6 +11,15 @@ public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygon : private readonly IDictionary _extensionData = new Dictionary(); + [JsonPropertyName("intent")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent? Intent { get; set; } + + [JsonPropertyName("measure")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure? Measure { get; set; } + + [JsonPropertyName("caption")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaption? Caption { get; set; } + [JsonPropertyName("ref")] public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonRef Ref { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaption.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaption.cs new file mode 100644 index 0000000..3671675 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaption.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaption + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("enabled")] + public required bool Enabled { get; set; } + + [JsonPropertyName("center")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaptionCenter? Center { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaptionCenter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaptionCenter.cs new file mode 100644 index 0000000..98c8784 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaptionCenter.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonCaptionCenter + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent.cs new file mode 100644 index 0000000..8c2fd0c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent PolygonCloud = + new(Values.PolygonCloud); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent PolygonDimension = + new(Values.PolygonDimension); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string PolygonCloud = "PolygonCloud"; + + public const string PolygonDimension = "PolygonDimension"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.cs new file mode 100644 index 0000000..d16c181 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.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(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + string type, + object? value + ) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Rl value + ) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl, + T + > onRl, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo, + T + > onGeo, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown, + T + > onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl? value + ) + { + if (Subtype == "RL") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo? value + ) + { + if (Subtype == "GEO") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown? value + ) + { + if (Subtype == "unknown") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Rl value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Geo value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure 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 DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Rl( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Geo( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasure.Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo.cs new file mode 100644 index 0000000..230af54 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureGeo + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl.cs new file mode 100644 index 0000000..b4b1e5e --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRl + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItem.cs new file mode 100644 index 0000000..9ecb02d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..72e2e9b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..cdda9ca --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItem.cs new file mode 100644 index 0000000..9534c52 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..f9e5713 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..2139dd7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItem.cs new file mode 100644 index 0000000..b3b7b2c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..76ecad9 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..9e09e87 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlOrigin.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlOrigin.cs new file mode 100644 index 0000000..e21408c --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlOrigin.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlOrigin + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItem.cs new file mode 100644 index 0000000..8c75264 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..0edc0fa --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..6105f8d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItem.cs new file mode 100644 index 0000000..316acb2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction.cs new file mode 100644 index 0000000..9315fe7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..60a3712 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItem.cs new file mode 100644 index 0000000..2a46a70 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction.cs new file mode 100644 index 0000000..543a551 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..3b64dc4 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown.cs new file mode 100644 index 0000000..f53fb9b --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolygonMeasureUnknown + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs index c596756..4a7a0ac 100644 --- a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline.cs @@ -11,6 +11,15 @@ public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolyline : private readonly IDictionary _extensionData = new Dictionary(); + [JsonPropertyName("intent")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent? Intent { get; set; } + + [JsonPropertyName("measure")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure? Measure { get; set; } + + [JsonPropertyName("caption")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaption? Caption { get; set; } + [JsonPropertyName("ref")] public required DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineRef Ref { get; set; } diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaption.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaption.cs new file mode 100644 index 0000000..302f100 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaption.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaption + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("enabled")] + public required bool Enabled { get; set; } + + [JsonPropertyName("center")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaptionCenter? Center { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaptionCenter.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaptionCenter.cs new file mode 100644 index 0000000..f075643 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaptionCenter.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineCaptionCenter + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent.cs new file mode 100644 index 0000000..975ec95 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent.cs @@ -0,0 +1,130 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntentSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent PolyLineDimension = + new(Values.PolyLineDimension); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntentSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineIntent value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string PolyLineDimension = "PolyLineDimension"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.cs new file mode 100644 index 0000000..ec28061 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.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(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.JsonConverter) +)] +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure +{ + internal DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + string type, + object? value + ) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Rl value + ) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure with . + /// + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown) + Value! + : throw new global::System.Exception( + "DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl, + T + > onRl, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo, + T + > onGeo, + Func< + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown, + T + > onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl? value + ) + { + if (Subtype == "RL") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo? value + ) + { + if (Subtype == "GEO") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown( + out CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown? value + ) + { + if (Subtype == "unknown") + { + value = + (CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Rl value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Geo value + ) => new(value); + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure).IsAssignableFrom( + typeToConvert + ); + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure 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 DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Rl( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Geo( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasure.Unknown( + CloudPDF.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo.cs new file mode 100644 index 0000000..5cc701d --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureGeo + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl.cs new file mode 100644 index 0000000..60563e3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRl + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItem.cs new file mode 100644 index 0000000..d28f1ad --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..738b652 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..03c7237 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItem.cs new file mode 100644 index 0000000..55f494a --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..b4c2285 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..477afcf --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItem.cs new file mode 100644 index 0000000..fb0ee66 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..b875169 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..04adee1 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlOrigin.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlOrigin.cs new file mode 100644 index 0000000..8b7b5c3 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlOrigin.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlOrigin + : 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/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItem.cs new file mode 100644 index 0000000..fdc9a91 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..7c5a460 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..5305794 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItem.cs new file mode 100644 index 0000000..e47ffe2 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction.cs new file mode 100644 index 0000000..f685ebf --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..5967502 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItem.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItem.cs new file mode 100644 index 0000000..1ea92ce --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItem.cs @@ -0,0 +1,56 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItem + : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction.cs new file mode 100644 index 0000000..4bc3738 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction.cs @@ -0,0 +1,149 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction Round = + new(Values.Round); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction Truncate = + new(Values.Truncate); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..ca32b83 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition.cs @@ -0,0 +1,139 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition.DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition Prefix = + new(Values.Prefix); + + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition( + string value + ) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition( + value + ); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown.cs b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown.cs new file mode 100644 index 0000000..3ccb5a7 --- /dev/null +++ b/src/CloudPDF/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocAnnotationsListAll200ResponsePagesItemAnnotationsItemPolylineMeasureUnknown + : 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/DocPagesSetScale200Response.cs b/src/CloudPDF/Types/DocPagesSetScale200Response.cs new file mode 100644 index 0000000..ab58931 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200Response.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("meta")] + public required DocPagesSetScale200ResponseMeta Meta { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale200ResponseMeta.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMeta.cs new file mode 100644 index 0000000..0966e0d --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMeta.cs @@ -0,0 +1,32 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMeta : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("affectedPages")] + public IEnumerable AffectedPages { get; set; } = + new List(); + + [JsonPropertyName("cacheDelta")] + public DocPagesSetScale200ResponseMetaCacheDelta? CacheDelta { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItem.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItem.cs new file mode 100644 index 0000000..694925a --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItem.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaAffectedPagesItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("revision")] + public required DocPagesSetScale200ResponseMetaAffectedPagesItemRevision Revision { get; set; } + + [JsonPropertyName("weakAnnotationState")] + public required DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState 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/DocPagesSetScale200ResponseMetaAffectedPagesItemRevision.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemRevision.cs new file mode 100644 index 0000000..89da3fe --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemRevision.cs @@ -0,0 +1,34 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaAffectedPagesItemRevision : 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/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.cs new file mode 100644 index 0000000..b5c97f6 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.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(DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.JsonConverter) +)] +[Serializable] +public record DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState +{ + internal DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + string type, + object? value + ) + { + Kind = type; + Value = value; + } + + /// + /// Create an instance of DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState with . + /// + public DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Unknown value + ) + { + Kind = "unknown"; + Value = value.Value; + } + + /// + /// Create an instance of DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState with . + /// + public DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.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.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown) + Value! + : throw new global::System.Exception( + "DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Kind is not 'unknown'" + ); + + /// + /// Returns the value as a if is 'known', otherwise throws an exception. + /// + /// Thrown when is not 'known'. + public CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown AsKnown() => + IsKnown + ? (CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown) + Value! + : throw new global::System.Exception( + "DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Kind is not 'known'" + ); + + public T Match( + Func< + CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown, + T + > onUnknown, + Func< + CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown, + 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.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown? value + ) + { + if (Kind == "unknown") + { + value = + (CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown) + Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsKnown( + out CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown? value + ) + { + if (Kind == "known") + { + value = + (CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown) + Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Unknown value + ) => new(value); + + public static implicit operator DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Known value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter + : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState).IsAssignableFrom( + typeToConvert + ); + + public override DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState 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.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown" + ), + "known" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown" + ), + _ => json.Deserialize(options), + }; + return new DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + discriminator, + value + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState 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 DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState 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 DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState( + stringValue, + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Kind); + } + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown( + CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown value + ) + { + Value = value; + } + + internal CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Unknown( + CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown value + ) => new(value); + } + + /// + /// Discriminated union type for known + /// + [Serializable] + public struct Known + { + public Known( + CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown value + ) + { + Value = value; + } + + internal CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationState.Known( + CloudPDF.DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.cs new file mode 100644 index 0000000..80441d5 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.cs @@ -0,0 +1,29 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown + : 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/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown.cs new file mode 100644 index 0000000..5292420 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown.cs @@ -0,0 +1,26 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown + : 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/DocPagesSetScale200ResponseMetaCacheDelta.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDelta.cs new file mode 100644 index 0000000..c6dc404 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDelta.cs @@ -0,0 +1,44 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaCacheDelta : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("previousDocVersion")] + public required int PreviousDocVersion { get; set; } + + [JsonPropertyName("docVersion")] + public required int DocVersion { get; set; } + + [JsonPropertyName("annotationsVersion")] + public int? AnnotationsVersion { get; set; } + + [JsonPropertyName("layerVersion")] + public int? LayerVersion { get; set; } + + [JsonPropertyName("working")] + public bool? Working { get; set; } + + [JsonPropertyName("pages")] + public IEnumerable Pages { get; set; } = + new List(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDeltaPagesItem.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDeltaPagesItem.cs new file mode 100644 index 0000000..758d5be --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDeltaPagesItem.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaCacheDeltaPagesItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("pageObjectNumber")] + public required int PageObjectNumber { get; set; } + + [JsonPropertyName("cache")] + public required DocPagesSetScale200ResponseMetaCacheDeltaPagesItemCache Cache { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDeltaPagesItemCache.cs b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDeltaPagesItemCache.cs new file mode 100644 index 0000000..4f425b9 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale200ResponseMetaCacheDeltaPagesItemCache.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale200ResponseMetaCacheDeltaPagesItemCache : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("contentVersion")] + public required int ContentVersion { get; set; } + + [JsonPropertyName("annotationVersion")] + public required int AnnotationVersion { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale400Response.cs b/src/CloudPDF/Types/DocPagesSetScale400Response.cs new file mode 100644 index 0000000..b2779ae --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale400Response.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale400Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required DocPagesSetScale400ResponseName Name { get; set; } + + [JsonPropertyName("code")] + public required DocPagesSetScale400ResponseCode 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/DocPagesSetScale400ResponseCode.cs b/src/CloudPDF/Types/DocPagesSetScale400ResponseCode.cs new file mode 100644 index 0000000..ea9fb42 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale400ResponseCode.cs @@ -0,0 +1,238 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocPagesSetScale400ResponseCode.DocPagesSetScale400ResponseCodeSerializer))] +[Serializable] +public readonly record struct DocPagesSetScale400ResponseCode : IStringEnum +{ + public static readonly DocPagesSetScale400ResponseCode Unknown = new(Values.Unknown); + + public static readonly DocPagesSetScale400ResponseCode InvalidArg = new(Values.InvalidArg); + + public static readonly DocPagesSetScale400ResponseCode DocNotOpen = new(Values.DocNotOpen); + + public static readonly DocPagesSetScale400ResponseCode DocOpenFailed = new( + Values.DocOpenFailed + ); + + public static readonly DocPagesSetScale400ResponseCode DocPasswordRequired = new( + Values.DocPasswordRequired + ); + + public static readonly DocPagesSetScale400ResponseCode DocPasswordIncorrect = new( + Values.DocPasswordIncorrect + ); + + public static readonly DocPagesSetScale400ResponseCode SharePasswordRequired = new( + Values.SharePasswordRequired + ); + + public static readonly DocPagesSetScale400ResponseCode Aborted = new(Values.Aborted); + + public static readonly DocPagesSetScale400ResponseCode Network = new(Values.Network); + + public static readonly DocPagesSetScale400ResponseCode Unauthenticated = new( + Values.Unauthenticated + ); + + public static readonly DocPagesSetScale400ResponseCode Forbidden = new(Values.Forbidden); + + public static readonly DocPagesSetScale400ResponseCode NotFound = new(Values.NotFound); + + public static readonly DocPagesSetScale400ResponseCode WireFormat = new(Values.WireFormat); + + public static readonly DocPagesSetScale400ResponseCode RuntimeUnavailable = new( + Values.RuntimeUnavailable + ); + + public static readonly DocPagesSetScale400ResponseCode InvalidReference = new( + Values.InvalidReference + ); + + public static readonly DocPagesSetScale400ResponseCode WeakAnnotationSessionConflict = new( + Values.WeakAnnotationSessionConflict + ); + + public static readonly DocPagesSetScale400ResponseCode LayerVersionConflict = new( + Values.LayerVersionConflict + ); + + public static readonly DocPagesSetScale400ResponseCode NotImplemented = new( + Values.NotImplemented + ); + + public static readonly DocPagesSetScale400ResponseCode MalformedPdf = new(Values.MalformedPdf); + + public static readonly DocPagesSetScale400ResponseCode SigningPending = new( + Values.SigningPending + ); + + public static readonly DocPagesSetScale400ResponseCode SigningExpired = new( + Values.SigningExpired + ); + + public static readonly DocPagesSetScale400ResponseCode SigningVersionMismatch = new( + Values.SigningVersionMismatch + ); + + public static readonly DocPagesSetScale400ResponseCode SignatureRefused = new( + Values.SignatureRefused + ); + + public static readonly DocPagesSetScale400ResponseCode ProtectedDocument = new( + Values.ProtectedDocument + ); + + public static readonly DocPagesSetScale400ResponseCode StaleBase = new(Values.StaleBase); + + public DocPagesSetScale400ResponseCode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScale400ResponseCode FromCustom(string value) + { + return new DocPagesSetScale400ResponseCode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesSetScale400ResponseCode value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesSetScale400ResponseCode value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScale400ResponseCode value) => value.Value; + + public static explicit operator DocPagesSetScale400ResponseCode(string value) => new(value); + + internal class DocPagesSetScale400ResponseCodeSerializer + : JsonConverter + { + public override DocPagesSetScale400ResponseCode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScale400ResponseCode(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScale400ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScale400ResponseCode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScale400ResponseCode(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScale400ResponseCode 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"; + + public const string SigningPending = "SigningPending"; + + public const string SigningExpired = "SigningExpired"; + + public const string SigningVersionMismatch = "SigningVersionMismatch"; + + public const string SignatureRefused = "SignatureRefused"; + + public const string ProtectedDocument = "ProtectedDocument"; + + public const string StaleBase = "StaleBase"; + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale400ResponseName.cs b/src/CloudPDF/Types/DocPagesSetScale400ResponseName.cs new file mode 100644 index 0000000..ddef8f3 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale400ResponseName.cs @@ -0,0 +1,112 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocPagesSetScale400ResponseName.DocPagesSetScale400ResponseNameSerializer))] +[Serializable] +public readonly record struct DocPagesSetScale400ResponseName : IStringEnum +{ + public static readonly DocPagesSetScale400ResponseName EngineError = new(Values.EngineError); + + public DocPagesSetScale400ResponseName(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScale400ResponseName FromCustom(string value) + { + return new DocPagesSetScale400ResponseName(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesSetScale400ResponseName value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesSetScale400ResponseName value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScale400ResponseName value) => value.Value; + + public static explicit operator DocPagesSetScale400ResponseName(string value) => new(value); + + internal class DocPagesSetScale400ResponseNameSerializer + : JsonConverter + { + public override DocPagesSetScale400ResponseName Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScale400ResponseName(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScale400ResponseName value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScale400ResponseName ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScale400ResponseName(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScale400ResponseName 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/DocPagesSetScale404Response.cs b/src/CloudPDF/Types/DocPagesSetScale404Response.cs new file mode 100644 index 0000000..c84c7b8 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale404Response.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesSetScale404Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required DocPagesSetScale404ResponseName Name { get; set; } + + [JsonPropertyName("code")] + public required DocPagesSetScale404ResponseCode 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/DocPagesSetScale404ResponseCode.cs b/src/CloudPDF/Types/DocPagesSetScale404ResponseCode.cs new file mode 100644 index 0000000..a8beef4 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale404ResponseCode.cs @@ -0,0 +1,238 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocPagesSetScale404ResponseCode.DocPagesSetScale404ResponseCodeSerializer))] +[Serializable] +public readonly record struct DocPagesSetScale404ResponseCode : IStringEnum +{ + public static readonly DocPagesSetScale404ResponseCode Unknown = new(Values.Unknown); + + public static readonly DocPagesSetScale404ResponseCode InvalidArg = new(Values.InvalidArg); + + public static readonly DocPagesSetScale404ResponseCode DocNotOpen = new(Values.DocNotOpen); + + public static readonly DocPagesSetScale404ResponseCode DocOpenFailed = new( + Values.DocOpenFailed + ); + + public static readonly DocPagesSetScale404ResponseCode DocPasswordRequired = new( + Values.DocPasswordRequired + ); + + public static readonly DocPagesSetScale404ResponseCode DocPasswordIncorrect = new( + Values.DocPasswordIncorrect + ); + + public static readonly DocPagesSetScale404ResponseCode SharePasswordRequired = new( + Values.SharePasswordRequired + ); + + public static readonly DocPagesSetScale404ResponseCode Aborted = new(Values.Aborted); + + public static readonly DocPagesSetScale404ResponseCode Network = new(Values.Network); + + public static readonly DocPagesSetScale404ResponseCode Unauthenticated = new( + Values.Unauthenticated + ); + + public static readonly DocPagesSetScale404ResponseCode Forbidden = new(Values.Forbidden); + + public static readonly DocPagesSetScale404ResponseCode NotFound = new(Values.NotFound); + + public static readonly DocPagesSetScale404ResponseCode WireFormat = new(Values.WireFormat); + + public static readonly DocPagesSetScale404ResponseCode RuntimeUnavailable = new( + Values.RuntimeUnavailable + ); + + public static readonly DocPagesSetScale404ResponseCode InvalidReference = new( + Values.InvalidReference + ); + + public static readonly DocPagesSetScale404ResponseCode WeakAnnotationSessionConflict = new( + Values.WeakAnnotationSessionConflict + ); + + public static readonly DocPagesSetScale404ResponseCode LayerVersionConflict = new( + Values.LayerVersionConflict + ); + + public static readonly DocPagesSetScale404ResponseCode NotImplemented = new( + Values.NotImplemented + ); + + public static readonly DocPagesSetScale404ResponseCode MalformedPdf = new(Values.MalformedPdf); + + public static readonly DocPagesSetScale404ResponseCode SigningPending = new( + Values.SigningPending + ); + + public static readonly DocPagesSetScale404ResponseCode SigningExpired = new( + Values.SigningExpired + ); + + public static readonly DocPagesSetScale404ResponseCode SigningVersionMismatch = new( + Values.SigningVersionMismatch + ); + + public static readonly DocPagesSetScale404ResponseCode SignatureRefused = new( + Values.SignatureRefused + ); + + public static readonly DocPagesSetScale404ResponseCode ProtectedDocument = new( + Values.ProtectedDocument + ); + + public static readonly DocPagesSetScale404ResponseCode StaleBase = new(Values.StaleBase); + + public DocPagesSetScale404ResponseCode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScale404ResponseCode FromCustom(string value) + { + return new DocPagesSetScale404ResponseCode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesSetScale404ResponseCode value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesSetScale404ResponseCode value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScale404ResponseCode value) => value.Value; + + public static explicit operator DocPagesSetScale404ResponseCode(string value) => new(value); + + internal class DocPagesSetScale404ResponseCodeSerializer + : JsonConverter + { + public override DocPagesSetScale404ResponseCode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScale404ResponseCode(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScale404ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScale404ResponseCode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScale404ResponseCode(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScale404ResponseCode 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"; + + public const string SigningPending = "SigningPending"; + + public const string SigningExpired = "SigningExpired"; + + public const string SigningVersionMismatch = "SigningVersionMismatch"; + + public const string SignatureRefused = "SignatureRefused"; + + public const string ProtectedDocument = "ProtectedDocument"; + + public const string StaleBase = "StaleBase"; + } +} diff --git a/src/CloudPDF/Types/DocPagesSetScale404ResponseName.cs b/src/CloudPDF/Types/DocPagesSetScale404ResponseName.cs new file mode 100644 index 0000000..9ce7e6a --- /dev/null +++ b/src/CloudPDF/Types/DocPagesSetScale404ResponseName.cs @@ -0,0 +1,112 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocPagesSetScale404ResponseName.DocPagesSetScale404ResponseNameSerializer))] +[Serializable] +public readonly record struct DocPagesSetScale404ResponseName : IStringEnum +{ + public static readonly DocPagesSetScale404ResponseName EngineError = new(Values.EngineError); + + public DocPagesSetScale404ResponseName(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesSetScale404ResponseName FromCustom(string value) + { + return new DocPagesSetScale404ResponseName(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesSetScale404ResponseName value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesSetScale404ResponseName value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesSetScale404ResponseName value) => value.Value; + + public static explicit operator DocPagesSetScale404ResponseName(string value) => new(value); + + internal class DocPagesSetScale404ResponseNameSerializer + : JsonConverter + { + public override DocPagesSetScale404ResponseName Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesSetScale404ResponseName(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesSetScale404ResponseName value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesSetScale404ResponseName ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesSetScale404ResponseName(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesSetScale404ResponseName 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/DocPagesViewports200ResponseItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItem.cs new file mode 100644 index 0000000..a976fa6 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItem.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("bbox")] + public required DocPagesViewports200ResponseItemBbox Bbox { get; set; } + + [JsonPropertyName("name")] + public string? Name { get; set; } + + [JsonPropertyName("measure")] + public DocPagesViewports200ResponseItemMeasure? Measure { get; set; } + + [JsonPropertyName("owned")] + public required bool Owned { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemBbox.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemBbox.cs new file mode 100644 index 0000000..5e2bef0 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemBbox.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemBbox : 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/DocPagesViewports200ResponseItemMeasure.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasure.cs new file mode 100644 index 0000000..45eda67 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasure.cs @@ -0,0 +1,373 @@ +// 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(DocPagesViewports200ResponseItemMeasure.JsonConverter))] +[Serializable] +public record DocPagesViewports200ResponseItemMeasure +{ + internal DocPagesViewports200ResponseItemMeasure(string type, object? value) + { + Subtype = type; + Value = value; + } + + /// + /// Create an instance of DocPagesViewports200ResponseItemMeasure with . + /// + public DocPagesViewports200ResponseItemMeasure(DocPagesViewports200ResponseItemMeasure.Rl value) + { + Subtype = "RL"; + Value = value.Value; + } + + /// + /// Create an instance of DocPagesViewports200ResponseItemMeasure with . + /// + public DocPagesViewports200ResponseItemMeasure( + DocPagesViewports200ResponseItemMeasure.Geo value + ) + { + Subtype = "GEO"; + Value = value.Value; + } + + /// + /// Create an instance of DocPagesViewports200ResponseItemMeasure with . + /// + public DocPagesViewports200ResponseItemMeasure( + DocPagesViewports200ResponseItemMeasure.Unknown value + ) + { + Subtype = "unknown"; + 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 "RL" + /// + public bool IsRl => Subtype == "RL"; + + /// + /// Returns true if is "GEO" + /// + public bool IsGeo => Subtype == "GEO"; + + /// + /// Returns true if is "unknown" + /// + public bool IsUnknown => Subtype == "unknown"; + + /// + /// Returns the value as a if is 'RL', otherwise throws an exception. + /// + /// Thrown when is not 'RL'. + public CloudPDF.DocPagesViewports200ResponseItemMeasureRl AsRl() => + IsRl + ? (CloudPDF.DocPagesViewports200ResponseItemMeasureRl)Value! + : throw new global::System.Exception( + "DocPagesViewports200ResponseItemMeasure.Subtype is not 'RL'" + ); + + /// + /// Returns the value as a if is 'GEO', otherwise throws an exception. + /// + /// Thrown when is not 'GEO'. + public CloudPDF.DocPagesViewports200ResponseItemMeasureGeo AsGeo() => + IsGeo + ? (CloudPDF.DocPagesViewports200ResponseItemMeasureGeo)Value! + : throw new global::System.Exception( + "DocPagesViewports200ResponseItemMeasure.Subtype is not 'GEO'" + ); + + /// + /// Returns the value as a if is 'unknown', otherwise throws an exception. + /// + /// Thrown when is not 'unknown'. + public CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown AsUnknown() => + IsUnknown + ? (CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown)Value! + : throw new global::System.Exception( + "DocPagesViewports200ResponseItemMeasure.Subtype is not 'unknown'" + ); + + public T Match( + Func onRl, + Func onGeo, + Func onUnknown, + Func onUnknown_ + ) + { + return Subtype switch + { + "RL" => onRl(AsRl()), + "GEO" => onGeo(AsGeo()), + "unknown" => onUnknown(AsUnknown()), + _ => onUnknown_(Subtype, Value), + }; + } + + public void Visit( + Action onRl, + Action onGeo, + Action onUnknown, + Action onUnknown_ + ) + { + switch (Subtype) + { + case "RL": + onRl(AsRl()); + break; + case "GEO": + onGeo(AsGeo()); + break; + case "unknown": + onUnknown(AsUnknown()); + break; + default: + onUnknown_(Subtype, Value); + break; + } + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsRl(out CloudPDF.DocPagesViewports200ResponseItemMeasureRl? value) + { + if (Subtype == "RL") + { + value = (CloudPDF.DocPagesViewports200ResponseItemMeasureRl)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsGeo(out CloudPDF.DocPagesViewports200ResponseItemMeasureGeo? value) + { + if (Subtype == "GEO") + { + value = (CloudPDF.DocPagesViewports200ResponseItemMeasureGeo)Value!; + return true; + } + value = null; + return false; + } + + /// + /// Attempts to cast the value to a and returns true if successful. + /// + public bool TryAsUnknown(out CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown? value) + { + if (Subtype == "unknown") + { + value = (CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown)Value!; + return true; + } + value = null; + return false; + } + + public override string ToString() => JsonUtils.Serialize(this); + + public static implicit operator DocPagesViewports200ResponseItemMeasure( + DocPagesViewports200ResponseItemMeasure.Rl value + ) => new(value); + + public static implicit operator DocPagesViewports200ResponseItemMeasure( + DocPagesViewports200ResponseItemMeasure.Geo value + ) => new(value); + + public static implicit operator DocPagesViewports200ResponseItemMeasure( + DocPagesViewports200ResponseItemMeasure.Unknown value + ) => new(value); + + [Serializable] + internal sealed class JsonConverter : JsonConverter + { + public override bool CanConvert(global::System.Type typeToConvert) => + typeof(DocPagesViewports200ResponseItemMeasure).IsAssignableFrom(typeToConvert); + + public override DocPagesViewports200ResponseItemMeasure 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 + { + "RL" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocPagesViewports200ResponseItemMeasureRl" + ), + "GEO" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocPagesViewports200ResponseItemMeasureGeo" + ), + "unknown" => + jsonWithoutDiscriminator.Deserialize( + options + ) + ?? throw new JsonException( + "Failed to deserialize CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown" + ), + _ => json.Deserialize(options), + }; + return new DocPagesViewports200ResponseItemMeasure(discriminator, value); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasure value, + JsonSerializerOptions options + ) + { + JsonNode json = + value.Subtype switch + { + "RL" => JsonSerializer.SerializeToNode(value.Value, options), + "GEO" => JsonSerializer.SerializeToNode(value.Value, options), + "unknown" => JsonSerializer.SerializeToNode(value.Value, options), + _ => JsonSerializer.SerializeToNode(value.Value, options), + } ?? new JsonObject(); + json["subtype"] = value.Subtype; + json.WriteTo(writer, options); + } + + public override DocPagesViewports200ResponseItemMeasure 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 DocPagesViewports200ResponseItemMeasure(stringValue, stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasure value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Subtype); + } + } + + /// + /// Discriminated union type for RL + /// + [Serializable] + public struct Rl + { + public Rl(CloudPDF.DocPagesViewports200ResponseItemMeasureRl value) + { + Value = value; + } + + internal CloudPDF.DocPagesViewports200ResponseItemMeasureRl Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocPagesViewports200ResponseItemMeasure.Rl( + CloudPDF.DocPagesViewports200ResponseItemMeasureRl value + ) => new(value); + } + + /// + /// Discriminated union type for GEO + /// + [Serializable] + public struct Geo + { + public Geo(CloudPDF.DocPagesViewports200ResponseItemMeasureGeo value) + { + Value = value; + } + + internal CloudPDF.DocPagesViewports200ResponseItemMeasureGeo Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocPagesViewports200ResponseItemMeasure.Geo( + CloudPDF.DocPagesViewports200ResponseItemMeasureGeo value + ) => new(value); + } + + /// + /// Discriminated union type for unknown + /// + [Serializable] + public struct Unknown + { + public Unknown(CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown value) + { + Value = value; + } + + internal CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown Value { get; set; } + + public override string ToString() => Value.ToString() ?? "null"; + + public static implicit operator DocPagesViewports200ResponseItemMeasure.Unknown( + CloudPDF.DocPagesViewports200ResponseItemMeasureUnknown value + ) => new(value); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureGeo.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureGeo.cs new file mode 100644 index 0000000..3f0101e --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureGeo.cs @@ -0,0 +1,25 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureGeo : 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/DocPagesViewports200ResponseItemMeasureRl.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRl.cs new file mode 100644 index 0000000..feeb7f6 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRl.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRl : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("ratio")] + public string? Ratio { get; set; } + + [JsonPropertyName("x")] + public IEnumerable X { get; set; } = + new List(); + + [JsonPropertyName("y")] + public IEnumerable? Y { get; set; } + + [JsonPropertyName("distance")] + public IEnumerable Distance { get; set; } = + new List(); + + [JsonPropertyName("area")] + public IEnumerable Area { get; set; } = + new List(); + + [JsonPropertyName("angle")] + public IEnumerable? Angle { get; set; } + + [JsonPropertyName("slope")] + public IEnumerable? Slope { get; set; } + + [JsonPropertyName("origin")] + public DocPagesViewports200ResponseItemMeasureRlOrigin? Origin { get; set; } + + [JsonPropertyName("cyx")] + public double? Cyx { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItem.cs new file mode 100644 index 0000000..a9cdd95 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlAngleItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesViewports200ResponseItemMeasureRlAngleItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItemFraction.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItemFraction.cs new file mode 100644 index 0000000..d401363 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItemFraction.cs @@ -0,0 +1,143 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlAngleItemFraction.DocPagesViewports200ResponseItemMeasureRlAngleItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlAngleItemFraction + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlAngleItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAngleItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAngleItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAngleItemFraction Truncate = + new(Values.Truncate); + + public DocPagesViewports200ResponseItemMeasureRlAngleItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlAngleItemFraction FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlAngleItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlAngleItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlAngleItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlAngleItemFraction value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlAngleItemFraction( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlAngleItemFractionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlAngleItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAngleItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlAngleItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAngleItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAngleItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition.cs new file mode 100644 index 0000000..4ace0fa --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition.cs @@ -0,0 +1,131 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition.DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition Prefix = + new(Values.Prefix); + + public DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAngleItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItem.cs new file mode 100644 index 0000000..84a3110 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlAreaItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesViewports200ResponseItemMeasureRlAreaItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItemFraction.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItemFraction.cs new file mode 100644 index 0000000..253b0b8 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItemFraction.cs @@ -0,0 +1,143 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlAreaItemFraction.DocPagesViewports200ResponseItemMeasureRlAreaItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlAreaItemFraction + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlAreaItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAreaItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAreaItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAreaItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesViewports200ResponseItemMeasureRlAreaItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlAreaItemFraction FromCustom(string value) + { + return new DocPagesViewports200ResponseItemMeasureRlAreaItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlAreaItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlAreaItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlAreaItemFraction value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlAreaItemFraction( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlAreaItemFractionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlAreaItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAreaItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlAreaItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAreaItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAreaItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition.cs new file mode 100644 index 0000000..cbabd99 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition.cs @@ -0,0 +1,131 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition.DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition Prefix = + new(Values.Prefix); + + public DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlAreaItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItem.cs new file mode 100644 index 0000000..2f7b36d --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlDistanceItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction.cs new file mode 100644 index 0000000..629e2a2 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction.cs @@ -0,0 +1,141 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction.DocPagesViewports200ResponseItemMeasureRlDistanceItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction Decimal = + new(Values.Decimal); + + public static readonly DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction Round = + new(Values.Round); + + public static readonly DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction Truncate = + new(Values.Truncate); + + public DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlDistanceItemFractionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlDistanceItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition.cs new file mode 100644 index 0000000..a4de76e --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition.cs @@ -0,0 +1,135 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition.DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition Prefix = + new(Values.Prefix); + + public DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition( + stringValue + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlDistanceItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlOrigin.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlOrigin.cs new file mode 100644 index 0000000..ed79235 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlOrigin.cs @@ -0,0 +1,31 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlOrigin : 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/DocPagesViewports200ResponseItemMeasureRlSlopeItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItem.cs new file mode 100644 index 0000000..d0cd39c --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlSlopeItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction.cs new file mode 100644 index 0000000..4310a4a --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction.cs @@ -0,0 +1,143 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction.DocPagesViewports200ResponseItemMeasureRlSlopeItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction Fraction = + new(Values.Fraction); + + public static readonly DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction Truncate = + new(Values.Truncate); + + public DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlSlopeItemFractionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlSlopeItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition.cs new file mode 100644 index 0000000..7ff743a --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition.cs @@ -0,0 +1,131 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition.DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition Suffix = + new(Values.Suffix); + + public static readonly DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition Prefix = + new(Values.Prefix); + + public DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlSlopeItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItem.cs new file mode 100644 index 0000000..36bbb60 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlXItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesViewports200ResponseItemMeasureRlXItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItemFraction.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItemFraction.cs new file mode 100644 index 0000000..da20edc --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItemFraction.cs @@ -0,0 +1,142 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlXItemFraction.DocPagesViewports200ResponseItemMeasureRlXItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlXItemFraction : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlXItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlXItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlXItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlXItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesViewports200ResponseItemMeasureRlXItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlXItemFraction FromCustom(string value) + { + return new DocPagesViewports200ResponseItemMeasureRlXItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlXItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlXItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlXItemFraction value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlXItemFraction( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlXItemFractionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlXItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlXItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlXItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlXItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlXItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition.cs new file mode 100644 index 0000000..1a7c0c6 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition.cs @@ -0,0 +1,133 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition.DocPagesViewports200ResponseItemMeasureRlXItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlXItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlXItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItem.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItem.cs new file mode 100644 index 0000000..eb22367 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItem.cs @@ -0,0 +1,55 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureRlYItem : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("unit")] + public required string Unit { get; set; } + + [JsonPropertyName("conversion")] + public double? Conversion { get; set; } + + [JsonPropertyName("fraction")] + public DocPagesViewports200ResponseItemMeasureRlYItemFraction? Fraction { get; set; } + + [JsonPropertyName("precision")] + public int? Precision { get; set; } + + [JsonPropertyName("fixed")] + public bool? Fixed { get; set; } + + [JsonPropertyName("thousands")] + public string? Thousands { get; set; } + + [JsonPropertyName("decimal")] + public string? Decimal { get; set; } + + [JsonPropertyName("prefixSpacing")] + public string? PrefixSpacing { get; set; } + + [JsonPropertyName("suffixSpacing")] + public string? SuffixSpacing { get; set; } + + [JsonPropertyName("labelPosition")] + public DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition? LabelPosition { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItemFraction.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItemFraction.cs new file mode 100644 index 0000000..24208dc --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItemFraction.cs @@ -0,0 +1,142 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlYItemFraction.DocPagesViewports200ResponseItemMeasureRlYItemFractionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlYItemFraction : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlYItemFraction Decimal = new( + Values.Decimal + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlYItemFraction Fraction = new( + Values.Fraction + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlYItemFraction Round = new( + Values.Round + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlYItemFraction Truncate = new( + Values.Truncate + ); + + public DocPagesViewports200ResponseItemMeasureRlYItemFraction(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlYItemFraction FromCustom(string value) + { + return new DocPagesViewports200ResponseItemMeasureRlYItemFraction(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlYItemFraction value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlYItemFraction value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlYItemFraction value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlYItemFraction( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlYItemFractionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlYItemFraction Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlYItemFraction(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlYItemFraction ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlYItemFraction(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlYItemFraction value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Decimal = "decimal"; + + public const string Fraction = "fraction"; + + public const string Round = "round"; + + public const string Truncate = "truncate"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition.cs new file mode 100644 index 0000000..669172e --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition.cs @@ -0,0 +1,133 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter( + typeof(DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition.DocPagesViewports200ResponseItemMeasureRlYItemLabelPositionSerializer) +)] +[Serializable] +public readonly record struct DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition + : IStringEnum +{ + public static readonly DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition Suffix = new( + Values.Suffix + ); + + public static readonly DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition Prefix = new( + Values.Prefix + ); + + public DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition FromCustom( + string value + ) + { + return new DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string( + DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition value + ) => value.Value; + + public static explicit operator DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition( + string value + ) => new(value); + + internal class DocPagesViewports200ResponseItemMeasureRlYItemLabelPositionSerializer + : JsonConverter + { + public override DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports200ResponseItemMeasureRlYItemLabelPosition value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Suffix = "suffix"; + + public const string Prefix = "prefix"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureUnknown.cs b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureUnknown.cs new file mode 100644 index 0000000..0cb4e38 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports200ResponseItemMeasureUnknown.cs @@ -0,0 +1,25 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports200ResponseItemMeasureUnknown : 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/DocPagesViewports404Response.cs b/src/CloudPDF/Types/DocPagesViewports404Response.cs new file mode 100644 index 0000000..1c201b8 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports404Response.cs @@ -0,0 +1,37 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[Serializable] +public record DocPagesViewports404Response : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required DocPagesViewports404ResponseName Name { get; set; } + + [JsonPropertyName("code")] + public required DocPagesViewports404ResponseCode 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/DocPagesViewports404ResponseCode.cs b/src/CloudPDF/Types/DocPagesViewports404ResponseCode.cs new file mode 100644 index 0000000..4fdcd78 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports404ResponseCode.cs @@ -0,0 +1,238 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocPagesViewports404ResponseCode.DocPagesViewports404ResponseCodeSerializer))] +[Serializable] +public readonly record struct DocPagesViewports404ResponseCode : IStringEnum +{ + public static readonly DocPagesViewports404ResponseCode Unknown = new(Values.Unknown); + + public static readonly DocPagesViewports404ResponseCode InvalidArg = new(Values.InvalidArg); + + public static readonly DocPagesViewports404ResponseCode DocNotOpen = new(Values.DocNotOpen); + + public static readonly DocPagesViewports404ResponseCode DocOpenFailed = new( + Values.DocOpenFailed + ); + + public static readonly DocPagesViewports404ResponseCode DocPasswordRequired = new( + Values.DocPasswordRequired + ); + + public static readonly DocPagesViewports404ResponseCode DocPasswordIncorrect = new( + Values.DocPasswordIncorrect + ); + + public static readonly DocPagesViewports404ResponseCode SharePasswordRequired = new( + Values.SharePasswordRequired + ); + + public static readonly DocPagesViewports404ResponseCode Aborted = new(Values.Aborted); + + public static readonly DocPagesViewports404ResponseCode Network = new(Values.Network); + + public static readonly DocPagesViewports404ResponseCode Unauthenticated = new( + Values.Unauthenticated + ); + + public static readonly DocPagesViewports404ResponseCode Forbidden = new(Values.Forbidden); + + public static readonly DocPagesViewports404ResponseCode NotFound = new(Values.NotFound); + + public static readonly DocPagesViewports404ResponseCode WireFormat = new(Values.WireFormat); + + public static readonly DocPagesViewports404ResponseCode RuntimeUnavailable = new( + Values.RuntimeUnavailable + ); + + public static readonly DocPagesViewports404ResponseCode InvalidReference = new( + Values.InvalidReference + ); + + public static readonly DocPagesViewports404ResponseCode WeakAnnotationSessionConflict = new( + Values.WeakAnnotationSessionConflict + ); + + public static readonly DocPagesViewports404ResponseCode LayerVersionConflict = new( + Values.LayerVersionConflict + ); + + public static readonly DocPagesViewports404ResponseCode NotImplemented = new( + Values.NotImplemented + ); + + public static readonly DocPagesViewports404ResponseCode MalformedPdf = new(Values.MalformedPdf); + + public static readonly DocPagesViewports404ResponseCode SigningPending = new( + Values.SigningPending + ); + + public static readonly DocPagesViewports404ResponseCode SigningExpired = new( + Values.SigningExpired + ); + + public static readonly DocPagesViewports404ResponseCode SigningVersionMismatch = new( + Values.SigningVersionMismatch + ); + + public static readonly DocPagesViewports404ResponseCode SignatureRefused = new( + Values.SignatureRefused + ); + + public static readonly DocPagesViewports404ResponseCode ProtectedDocument = new( + Values.ProtectedDocument + ); + + public static readonly DocPagesViewports404ResponseCode StaleBase = new(Values.StaleBase); + + public DocPagesViewports404ResponseCode(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports404ResponseCode FromCustom(string value) + { + return new DocPagesViewports404ResponseCode(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesViewports404ResponseCode value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesViewports404ResponseCode value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesViewports404ResponseCode value) => value.Value; + + public static explicit operator DocPagesViewports404ResponseCode(string value) => new(value); + + internal class DocPagesViewports404ResponseCodeSerializer + : JsonConverter + { + public override DocPagesViewports404ResponseCode Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports404ResponseCode(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports404ResponseCode value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports404ResponseCode ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports404ResponseCode(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports404ResponseCode 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"; + + public const string SigningPending = "SigningPending"; + + public const string SigningExpired = "SigningExpired"; + + public const string SigningVersionMismatch = "SigningVersionMismatch"; + + public const string SignatureRefused = "SignatureRefused"; + + public const string ProtectedDocument = "ProtectedDocument"; + + public const string StaleBase = "StaleBase"; + } +} diff --git a/src/CloudPDF/Types/DocPagesViewports404ResponseName.cs b/src/CloudPDF/Types/DocPagesViewports404ResponseName.cs new file mode 100644 index 0000000..6597099 --- /dev/null +++ b/src/CloudPDF/Types/DocPagesViewports404ResponseName.cs @@ -0,0 +1,112 @@ +using CloudPDF.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace CloudPDF; + +[JsonConverter(typeof(DocPagesViewports404ResponseName.DocPagesViewports404ResponseNameSerializer))] +[Serializable] +public readonly record struct DocPagesViewports404ResponseName : IStringEnum +{ + public static readonly DocPagesViewports404ResponseName EngineError = new(Values.EngineError); + + public DocPagesViewports404ResponseName(string value) + { + Value = value; + } + + /// + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static DocPagesViewports404ResponseName FromCustom(string value) + { + return new DocPagesViewports404ResponseName(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==(DocPagesViewports404ResponseName value1, string value2) => + value1.Value.Equals(value2); + + public static bool operator !=(DocPagesViewports404ResponseName value1, string value2) => + !value1.Value.Equals(value2); + + public static explicit operator string(DocPagesViewports404ResponseName value) => value.Value; + + public static explicit operator DocPagesViewports404ResponseName(string value) => new(value); + + internal class DocPagesViewports404ResponseNameSerializer + : JsonConverter + { + public override DocPagesViewports404ResponseName Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new DocPagesViewports404ResponseName(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + DocPagesViewports404ResponseName value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override DocPagesViewports404ResponseName ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new DocPagesViewports404ResponseName(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DocPagesViewports404ResponseName value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string EngineError = "EngineError"; + } +}