Adopt http\encode\datetime from cadl ranch (#4252)

Fixes: https://github.com/microsoft/typespec/issues/3972

---------

Co-authored-by: ShivangiReja <shivangi.reja@microsoft.com>
This commit is contained in:
ShivangiReja 2024-08-23 16:38:32 -07:00 коммит произвёл GitHub
Родитель d932462149
Коммит 142f44fa23
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
24 изменённых файлов: 2624 добавлений и 1 удалений

Просмотреть файл

@ -54,7 +54,6 @@ $failingSpecs = @(
Join-Path 'http' 'client' 'structure' 'client-operation-group'
Join-Path 'http' 'client' 'structure' 'renamed-operation'
Join-Path 'http' 'client' 'structure' 'two-operation-group'
Join-Path 'http' 'encode' 'datetime'
Join-Path 'http' 'parameters' 'body-optionality'
Join-Path 'http' 'parameters' 'collection-format'
Join-Path 'http' 'parameters' 'spread'

Просмотреть файл

@ -40,6 +40,11 @@
"commandName": "Executable",
"executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe"
},
"http-encode-datetime": {
"commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/encode/datetime -p StubLibraryPlugin",
"commandName": "Executable",
"executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe"
},
"http-encode-duration": {
"commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/encode/duration -p StubLibraryPlugin",
"commandName": "Executable",

Просмотреть файл

@ -0,0 +1,183 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Threading.Tasks;
using Encode.Datetime;
using Encode.Datetime.Models;
using NUnit.Framework;
namespace TestProjects.CadlRanch.Tests.Http.Encode.DateTime
{
public class DateTimeTests : CadlRanchTestBase
{
[CadlRanchTest]
public Task Encode_Datetime_ResponseHeader_default() => Test(async (host) =>
{
var response = await new DatetimeClient(host, null).GetResponseHeaderClient().DefaultAsync();
Assert.AreEqual(204, response.GetRawResponse().Status);
Assert.IsTrue(response.GetRawResponse().Headers.TryGetValue("value", out string? header));
Assert.AreEqual("Fri, 26 Aug 2022 14:38:00 GMT", header);
});
[CadlRanchTest]
public Task Encode_Datetime_ResponseHeader_rfc3339() => Test(async (host) =>
{
var response = await new DatetimeClient(host, null).GetResponseHeaderClient().Rfc3339Async();
Assert.AreEqual(204, response.GetRawResponse().Status);
Assert.IsTrue(response.GetRawResponse().Headers.TryGetValue("value", out string? header));
Assert.AreEqual("2022-08-26T18:38:00.000Z", header);
});
[CadlRanchTest]
public Task Encode_Datetime_ResponseHeader_rfc7231() => Test(async (host) =>
{
var response = await new DatetimeClient(host, null).GetResponseHeaderClient().Rfc7231Async();
Assert.AreEqual(204, response.GetRawResponse().Status);
Assert.IsTrue(response.GetRawResponse().Headers.TryGetValue("value", out string? header));
Assert.AreEqual("Fri, 26 Aug 2022 14:38:00 GMT", header);
});
[CadlRanchTest]
public Task Encode_Datetime_ResponseHeader_unixTimestamp() => Test(async (host) =>
{
var response = await new DatetimeClient(host, null).GetResponseHeaderClient().UnixTimestampAsync();
Assert.AreEqual(204, response.GetRawResponse().Status);
Assert.IsTrue(response.GetRawResponse().Headers.TryGetValue("value", out string? header));
Assert.AreEqual("1686566864", header);
});
[CadlRanchTest]
public Task Encode_DateTime_Header_Default() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("Fri, 26 Aug 2022 14:38:00 GMT");
var response = await new DatetimeClient(host, null).GetHeaderClient().DefaultAsync(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Header_Rfc3339() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("2022-08-26T18:38:00.000Z");
var response = await new DatetimeClient(host, null).GetHeaderClient().Rfc3339Async(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Header_Rfc7231() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("Fri, 26 Aug 2022 14:38:00 GMT");
var response = await new DatetimeClient(host, null).GetHeaderClient().Rfc7231Async(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Header_unixTimestamp() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.FromUnixTimeSeconds(1686566864);
var response = await new DatetimeClient(host, null).GetHeaderClient().UnixTimestampAsync(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Header_unixTimestampArray() => Test(async (host) =>
{
DateTimeOffset data1 = DateTimeOffset.FromUnixTimeSeconds(1686566864);
DateTimeOffset data2 = DateTimeOffset.FromUnixTimeSeconds(1686734256);
var response = await new DatetimeClient(host, null).GetHeaderClient().UnixTimestampArrayAsync(new[] { data1, data2 });
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Query_Default() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("2022-08-26T18:38:00.000Z");
var response = await new DatetimeClient(host, null).GetQueryClient().DefaultAsync(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Query_Rfc3339() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("2022-08-26T18:38:00.000Z");
var response = await new DatetimeClient(host, null).GetQueryClient().Rfc3339Async(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Query_Rfc7231() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("Fri, 26 Aug 2022 14:38:00 GMT");
var response = await new DatetimeClient(host, null).GetQueryClient().Rfc7231Async(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Query_unixTimestamp() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.FromUnixTimeSeconds(1686566864);
var response = await new DatetimeClient(host, null).GetQueryClient().UnixTimestampAsync(data);
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Query_unixTimestampArray() => Test(async (host) =>
{
DateTimeOffset data1 = DateTimeOffset.FromUnixTimeSeconds(1686566864);
DateTimeOffset data2 = DateTimeOffset.FromUnixTimeSeconds(1686734256);
var response = await new DatetimeClient(host, null).GetQueryClient().UnixTimestampArrayAsync(new[] { data1, data2 });
Assert.AreEqual(204, response.GetRawResponse().Status);
});
[CadlRanchTest]
public Task Encode_DateTime_Property_Default() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("2022-08-26T18:38:00.000Z");
var body = new DefaultDatetimeProperty(data);
var response = await new DatetimeClient(host, null).GetPropertyClient().DefaultAsync(body);
Assert.AreEqual(body.Value, response.Value.Value);
});
[CadlRanchTest]
public Task Encode_DateTime_Property_Rfc3339() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("2022-08-26T18:38:00.000Z");
var body = new Rfc3339DatetimeProperty(data);
var response = await new DatetimeClient(host, null).GetPropertyClient().Rfc3339Async(body);
Assert.AreEqual(body.Value, response.Value.Value);
});
[CadlRanchTest]
public Task Encode_DateTime_Property_Rfc7231() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.Parse("Fri, 26 Aug 2022 14:38:00 GMT");
var body = new Rfc7231DatetimeProperty(data);
var response = await new DatetimeClient(host, null).GetPropertyClient().Rfc7231Async(body);
Assert.AreEqual(body.Value, response.Value.Value);
});
[CadlRanchTest]
public Task Encode_DateTime_Property_unixTimestamp() => Test(async (host) =>
{
DateTimeOffset data = DateTimeOffset.FromUnixTimeSeconds(1686566864);
var body = new UnixTimestampDatetimeProperty(data);
var response = await new DatetimeClient(host, null).GetPropertyClient().UnixTimestampAsync(body);
Assert.AreEqual(body.Value, response.Value.Value);
});
[CadlRanchTest]
public Task Encode_DateTime_Property_unixTimestampArray() => Test(async (host) =>
{
DateTimeOffset data1 = DateTimeOffset.FromUnixTimeSeconds(1686566864);
DateTimeOffset data2 = DateTimeOffset.FromUnixTimeSeconds(1686734256);
var body = new UnixTimestampArrayDatetimeProperty(new[] { data1, data2 });
var response = await new DatetimeClient(host, null).GetPropertyClient().UnixTimestampArrayAsync(body);
Assert.AreEqual(body.Value, response.Value.Value);
});
}
}

Просмотреть файл

@ -0,0 +1,6 @@
{
"output-folder": ".",
"namespace": "Encode.Datetime",
"library-name": "Encode.Datetime",
"use-model-reader-writer": true
}

Просмотреть файл

@ -0,0 +1,48 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29709.97
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Encode.Datetime", "src\Encode.Datetime.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>This is the Encode.Datetime client library for developing .NET applications with rich experience.</Description>
<AssemblyTitle>SDK Code Generation Encode.Datetime</AssemblyTitle>
<Version>1.0.0-beta.1</Version>
<PackageTags>Encode.Datetime</PackageTags>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ClientModel" Version="1.1.0-beta.4" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel.Primitives;
namespace Encode.Datetime
{
public partial class DatetimeClient
{
public DatetimeClient() : this(new Uri("http://localhost:3000"), new DatetimeClientOptions()) => throw null;
public DatetimeClient(Uri endpoint, DatetimeClientOptions options) => throw null;
public ClientPipeline Pipeline => throw null;
public virtual Query GetQueryClient() => throw null;
public virtual Property GetPropertyClient() => throw null;
public virtual Header GetHeaderClient() => throw null;
public virtual ResponseHeader GetResponseHeaderClient() => throw null;
}
}

Просмотреть файл

@ -0,0 +1,12 @@
// <auto-generated/>
#nullable disable
using System.ClientModel.Primitives;
namespace Encode.Datetime
{
public partial class DatetimeClientOptions : ClientPipelineOptions
{
}
}

Просмотреть файл

@ -0,0 +1,22 @@
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
namespace Encode.Datetime.Models
{
public static partial class EncodeDatetimeModelFactory
{
public static DefaultDatetimeProperty DefaultDatetimeProperty(DateTimeOffset value = default) => throw null;
public static Rfc3339DatetimeProperty Rfc3339DatetimeProperty(DateTimeOffset value = default) => throw null;
public static Rfc7231DatetimeProperty Rfc7231DatetimeProperty(DateTimeOffset value = default) => throw null;
public static UnixTimestampDatetimeProperty UnixTimestampDatetimeProperty(DateTimeOffset value = default) => throw null;
public static UnixTimestampArrayDatetimeProperty UnixTimestampArrayDatetimeProperty(IEnumerable<DateTimeOffset> value = default) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,59 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Encode.Datetime
{
public partial class Header
{
protected Header() => throw null;
public ClientPipeline Pipeline => throw null;
public virtual ClientResult Default(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> DefaultAsync(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult Default(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> DefaultAsync(DateTimeOffset value) => throw null;
public virtual ClientResult Rfc3339(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc3339Async(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult Rfc3339(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> Rfc3339Async(DateTimeOffset value) => throw null;
public virtual ClientResult Rfc7231(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc7231Async(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult Rfc7231(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> Rfc7231Async(DateTimeOffset value) => throw null;
public virtual ClientResult UnixTimestamp(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampAsync(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult UnixTimestamp(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> UnixTimestampAsync(DateTimeOffset value) => throw null;
public virtual ClientResult UnixTimestampArray(IList<DateTimeOffset> value, RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampArrayAsync(IList<DateTimeOffset> value, RequestOptions options) => throw null;
public virtual ClientResult UnixTimestampArray(IList<DateTimeOffset> value) => throw null;
public virtual Task<ClientResult> UnixTimestampArrayAsync(IList<DateTimeOffset> value) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,36 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Text.Json;
namespace Encode.Datetime.Models
{
public partial class DefaultDatetimeProperty : IJsonModel<DefaultDatetimeProperty>
{
void IJsonModel<DefaultDatetimeProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
DefaultDatetimeProperty IJsonModel<DefaultDatetimeProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
protected virtual DefaultDatetimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
BinaryData IPersistableModel<DefaultDatetimeProperty>.Write(ModelReaderWriterOptions options) => throw null;
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
DefaultDatetimeProperty IPersistableModel<DefaultDatetimeProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
protected virtual DefaultDatetimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
string IPersistableModel<DefaultDatetimeProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
public static implicit operator BinaryContent(DefaultDatetimeProperty defaultDatetimeProperty) => throw null;
public static explicit operator DefaultDatetimeProperty(ClientResult result) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// <auto-generated/>
#nullable disable
using System;
namespace Encode.Datetime.Models
{
public partial class DefaultDatetimeProperty
{
public DefaultDatetimeProperty(DateTimeOffset value) => throw null;
public DateTimeOffset Value
{
get => throw null;
set => throw null;
}
}
}

Просмотреть файл

@ -0,0 +1,36 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Text.Json;
namespace Encode.Datetime.Models
{
public partial class Rfc3339DatetimeProperty : IJsonModel<Rfc3339DatetimeProperty>
{
void IJsonModel<Rfc3339DatetimeProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
Rfc3339DatetimeProperty IJsonModel<Rfc3339DatetimeProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
protected virtual Rfc3339DatetimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
BinaryData IPersistableModel<Rfc3339DatetimeProperty>.Write(ModelReaderWriterOptions options) => throw null;
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
Rfc3339DatetimeProperty IPersistableModel<Rfc3339DatetimeProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
protected virtual Rfc3339DatetimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
string IPersistableModel<Rfc3339DatetimeProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
public static implicit operator BinaryContent(Rfc3339DatetimeProperty rfc3339DatetimeProperty) => throw null;
public static explicit operator Rfc3339DatetimeProperty(ClientResult result) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// <auto-generated/>
#nullable disable
using System;
namespace Encode.Datetime.Models
{
public partial class Rfc3339DatetimeProperty
{
public Rfc3339DatetimeProperty(DateTimeOffset value) => throw null;
public DateTimeOffset Value
{
get => throw null;
set => throw null;
}
}
}

Просмотреть файл

@ -0,0 +1,36 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Text.Json;
namespace Encode.Datetime.Models
{
public partial class Rfc7231DatetimeProperty : IJsonModel<Rfc7231DatetimeProperty>
{
void IJsonModel<Rfc7231DatetimeProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
Rfc7231DatetimeProperty IJsonModel<Rfc7231DatetimeProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
protected virtual Rfc7231DatetimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
BinaryData IPersistableModel<Rfc7231DatetimeProperty>.Write(ModelReaderWriterOptions options) => throw null;
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
Rfc7231DatetimeProperty IPersistableModel<Rfc7231DatetimeProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
protected virtual Rfc7231DatetimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
string IPersistableModel<Rfc7231DatetimeProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
public static implicit operator BinaryContent(Rfc7231DatetimeProperty rfc7231DatetimeProperty) => throw null;
public static explicit operator Rfc7231DatetimeProperty(ClientResult result) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// <auto-generated/>
#nullable disable
using System;
namespace Encode.Datetime.Models
{
public partial class Rfc7231DatetimeProperty
{
public Rfc7231DatetimeProperty(DateTimeOffset value) => throw null;
public DateTimeOffset Value
{
get => throw null;
set => throw null;
}
}
}

Просмотреть файл

@ -0,0 +1,36 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Text.Json;
namespace Encode.Datetime.Models
{
public partial class UnixTimestampArrayDatetimeProperty : IJsonModel<UnixTimestampArrayDatetimeProperty>
{
void IJsonModel<UnixTimestampArrayDatetimeProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
UnixTimestampArrayDatetimeProperty IJsonModel<UnixTimestampArrayDatetimeProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
protected virtual UnixTimestampArrayDatetimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
BinaryData IPersistableModel<UnixTimestampArrayDatetimeProperty>.Write(ModelReaderWriterOptions options) => throw null;
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
UnixTimestampArrayDatetimeProperty IPersistableModel<UnixTimestampArrayDatetimeProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
protected virtual UnixTimestampArrayDatetimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
string IPersistableModel<UnixTimestampArrayDatetimeProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
public static implicit operator BinaryContent(UnixTimestampArrayDatetimeProperty unixTimestampArrayDatetimeProperty) => throw null;
public static explicit operator UnixTimestampArrayDatetimeProperty(ClientResult result) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,16 @@
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
namespace Encode.Datetime.Models
{
public partial class UnixTimestampArrayDatetimeProperty
{
public UnixTimestampArrayDatetimeProperty(IEnumerable<DateTimeOffset> value) => throw null;
public IList<DateTimeOffset> Value => throw null;
}
}

Просмотреть файл

@ -0,0 +1,36 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Text.Json;
namespace Encode.Datetime.Models
{
public partial class UnixTimestampDatetimeProperty : IJsonModel<UnixTimestampDatetimeProperty>
{
void IJsonModel<UnixTimestampDatetimeProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
UnixTimestampDatetimeProperty IJsonModel<UnixTimestampDatetimeProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
protected virtual UnixTimestampDatetimeProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
BinaryData IPersistableModel<UnixTimestampDatetimeProperty>.Write(ModelReaderWriterOptions options) => throw null;
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
UnixTimestampDatetimeProperty IPersistableModel<UnixTimestampDatetimeProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
protected virtual UnixTimestampDatetimeProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
string IPersistableModel<UnixTimestampDatetimeProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
public static implicit operator BinaryContent(UnixTimestampDatetimeProperty unixTimestampDatetimeProperty) => throw null;
public static explicit operator UnixTimestampDatetimeProperty(ClientResult result) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// <auto-generated/>
#nullable disable
using System;
namespace Encode.Datetime.Models
{
public partial class UnixTimestampDatetimeProperty
{
public UnixTimestampDatetimeProperty(DateTimeOffset value) => throw null;
public DateTimeOffset Value
{
get => throw null;
set => throw null;
}
}
}

Просмотреть файл

@ -0,0 +1,58 @@
// <auto-generated/>
#nullable disable
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Threading.Tasks;
using Encode.Datetime.Models;
namespace Encode.Datetime
{
public partial class Property
{
protected Property() => throw null;
public ClientPipeline Pipeline => throw null;
public virtual ClientResult Default(BinaryContent content, RequestOptions options) => throw null;
public virtual Task<ClientResult> DefaultAsync(BinaryContent content, RequestOptions options) => throw null;
public virtual ClientResult<DefaultDatetimeProperty> Default(DefaultDatetimeProperty body) => throw null;
public virtual Task<ClientResult<DefaultDatetimeProperty>> DefaultAsync(DefaultDatetimeProperty body) => throw null;
public virtual ClientResult Rfc3339(BinaryContent content, RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc3339Async(BinaryContent content, RequestOptions options) => throw null;
public virtual ClientResult<Rfc3339DatetimeProperty> Rfc3339(Rfc3339DatetimeProperty body) => throw null;
public virtual Task<ClientResult<Rfc3339DatetimeProperty>> Rfc3339Async(Rfc3339DatetimeProperty body) => throw null;
public virtual ClientResult Rfc7231(BinaryContent content, RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc7231Async(BinaryContent content, RequestOptions options) => throw null;
public virtual ClientResult<Rfc7231DatetimeProperty> Rfc7231(Rfc7231DatetimeProperty body) => throw null;
public virtual Task<ClientResult<Rfc7231DatetimeProperty>> Rfc7231Async(Rfc7231DatetimeProperty body) => throw null;
public virtual ClientResult UnixTimestamp(BinaryContent content, RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampAsync(BinaryContent content, RequestOptions options) => throw null;
public virtual ClientResult<UnixTimestampDatetimeProperty> UnixTimestamp(UnixTimestampDatetimeProperty body) => throw null;
public virtual Task<ClientResult<UnixTimestampDatetimeProperty>> UnixTimestampAsync(UnixTimestampDatetimeProperty body) => throw null;
public virtual ClientResult UnixTimestampArray(BinaryContent content, RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampArrayAsync(BinaryContent content, RequestOptions options) => throw null;
public virtual ClientResult<UnixTimestampArrayDatetimeProperty> UnixTimestampArray(UnixTimestampArrayDatetimeProperty body) => throw null;
public virtual Task<ClientResult<UnixTimestampArrayDatetimeProperty>> UnixTimestampArrayAsync(UnixTimestampArrayDatetimeProperty body) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,59 @@
// <auto-generated/>
#nullable disable
using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Encode.Datetime
{
public partial class Query
{
protected Query() => throw null;
public ClientPipeline Pipeline => throw null;
public virtual ClientResult Default(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> DefaultAsync(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult Default(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> DefaultAsync(DateTimeOffset value) => throw null;
public virtual ClientResult Rfc3339(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc3339Async(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult Rfc3339(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> Rfc3339Async(DateTimeOffset value) => throw null;
public virtual ClientResult Rfc7231(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc7231Async(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult Rfc7231(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> Rfc7231Async(DateTimeOffset value) => throw null;
public virtual ClientResult UnixTimestamp(DateTimeOffset value, RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampAsync(DateTimeOffset value, RequestOptions options) => throw null;
public virtual ClientResult UnixTimestamp(DateTimeOffset value) => throw null;
public virtual Task<ClientResult> UnixTimestampAsync(DateTimeOffset value) => throw null;
public virtual ClientResult UnixTimestampArray(IList<DateTimeOffset> value, RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampArrayAsync(IList<DateTimeOffset> value, RequestOptions options) => throw null;
public virtual ClientResult UnixTimestampArray(IList<DateTimeOffset> value) => throw null;
public virtual Task<ClientResult> UnixTimestampArrayAsync(IList<DateTimeOffset> value) => throw null;
}
}

Просмотреть файл

@ -0,0 +1,49 @@
// <auto-generated/>
#nullable disable
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Threading.Tasks;
namespace Encode.Datetime
{
public partial class ResponseHeader
{
protected ResponseHeader() => throw null;
public ClientPipeline Pipeline => throw null;
public virtual ClientResult Default(RequestOptions options) => throw null;
public virtual Task<ClientResult> DefaultAsync(RequestOptions options) => throw null;
public virtual ClientResult Default() => throw null;
public virtual Task<ClientResult> DefaultAsync() => throw null;
public virtual ClientResult Rfc3339(RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc3339Async(RequestOptions options) => throw null;
public virtual ClientResult Rfc3339() => throw null;
public virtual Task<ClientResult> Rfc3339Async() => throw null;
public virtual ClientResult Rfc7231(RequestOptions options) => throw null;
public virtual Task<ClientResult> Rfc7231Async(RequestOptions options) => throw null;
public virtual ClientResult Rfc7231() => throw null;
public virtual Task<ClientResult> Rfc7231Async() => throw null;
public virtual ClientResult UnixTimestamp(RequestOptions options) => throw null;
public virtual Task<ClientResult> UnixTimestampAsync(RequestOptions options) => throw null;
public virtual ClientResult UnixTimestamp() => throw null;
public virtual Task<ClientResult> UnixTimestampAsync() => throw null;
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу